Skip to content

Commit a0ad4c1

Browse files
authored
Syncing protocol buffers (#73)
1 parent d219b5c commit a0ad4c1

File tree

1 file changed

+289
-0
lines changed

1 file changed

+289
-0
lines changed

wgtwo/ir21/v1/ir21.proto

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
// Copyright 2024 [Working Group Two]/[Cisco Systems]
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
16+
syntax = "proto3";
17+
18+
package wgtwo.ir21.v1;
19+
20+
import "google/api/annotations.proto";
21+
import "wgtwo/annotations/annotations.proto";
22+
import "wgtwo/common/v1/types.proto";
23+
24+
option java_package = "com.wgtwo.api.v1.ir21";
25+
option java_outer_classname = "Ir21Proto";
26+
option java_multiple_files = true;
27+
option go_package = "github.com/working-group-two/wgtwoapis/wgtwo/ir21/v1";
28+
29+
// This service is used to import IR.21 data into an IR21 database.
30+
//
31+
// IR21 data consists of organisation information, such as organisation name, country, TADIGs, MCCMNCs, GT prefixes,
32+
// and realms. The data is used when subscribers are roaming.
33+
service Ir21Service {
34+
35+
// CreateOrUpdateOrganisation is used to import organisation information into the IR21 database. An organisation
36+
// consists of a name, country, TADIGs, MCCMNCs, GT prefixes, realms, and notes, and is part of a dataset.
37+
//
38+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
39+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
40+
rpc CreateOrUpdateOrganisation(CreateOrUpdateOrganisationRequest) returns (CreateOrUpdateOrganisationResponse) {
41+
option (status) = BETA;
42+
option (scope) = "";
43+
}
44+
45+
// CreateOrUpdateOrganisationFromXml is used to import organisation information from an XML file into the IR21
46+
// database. The XML file should contain the organisation data.
47+
//
48+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
49+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
50+
rpc CreateOrUpdateOrganisationFromXml(CreateOrUpdateOrganisationFromXmlRequest)
51+
returns (CreateOrUpdateOrganisationFromXmlResponse) {
52+
option (status) = BETA;
53+
option (scope) = "";
54+
}
55+
56+
// DeleteOrganisation is used to delete an organisation from the IR21 database. The organisation is identified by its
57+
// UUID and is part of a dataset.
58+
//
59+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
60+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
61+
rpc DeleteOrganisation(DeleteOrganisationRequest) returns (DeleteOrganisationResponse) {
62+
option (status) = BETA;
63+
option (scope) = "";
64+
}
65+
66+
// ListOrganisations is used to list organisations from a dataset in the IR21 database.
67+
//
68+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
69+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
70+
rpc ListOrganisations(ListOrganisationsRequest) returns (ListOrganisationsResponse) {
71+
option (status) = BETA;
72+
option (scope) = "";
73+
}
74+
75+
// GetOrganisation is used to get an organisation from the IR21 database. The organisation is identified by its UUID.
76+
//
77+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
78+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
79+
rpc GetOrganisation(GetOrganisationRequest) returns (GetOrganisationResponse) {
80+
option (status) = BETA;
81+
option (scope) = "";
82+
}
83+
84+
// ListDatasets is used to list datasets from the IR21 database.
85+
//
86+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
87+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
88+
rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
89+
option (status) = BETA;
90+
option (scope) = "";
91+
}
92+
93+
// CreateDataset is used to create a dataset in the IR21 database. A dataset has a name and a UUID.
94+
//
95+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
96+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
97+
rpc CreateDataset(CreateDatasetRequest) returns (CreateDatasetResponse) {
98+
option (status) = BETA;
99+
option (scope) = "";
100+
}
101+
102+
// DeleteDataset is used to delete a dataset from the IR21 database. The dataset is identified by its UUID.
103+
//
104+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
105+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
106+
rpc DeleteDataset(DeleteDatasetRequest) returns (DeleteDatasetResponse) {
107+
option (status) = BETA;
108+
option (scope) = "";
109+
}
110+
111+
// CopyDataset is used to copy a dataset in the IR21 database.
112+
//
113+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
114+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
115+
rpc CopyDataset(CopyDatasetRequest) returns (CopyDatasetResponse) {
116+
option (status) = BETA;
117+
option (scope) = "";
118+
}
119+
120+
// SetCurrentDatasetForTenant is used to set the active dataset for a tenant in the IR21 database.
121+
//
122+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
123+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
124+
rpc SetActiveDataset(SetActiveDatasetRequest) returns (SetActiveDatasetResponse) {
125+
option (status) = BETA;
126+
option (scope) = "";
127+
}
128+
129+
// GetActiveDatasets gets a list of pairs where each pair contains a dataset UUID and a tenant UUID.
130+
//
131+
// NOTE: THIS METHOD IS CURRENTLY IN BETA RELEASE
132+
// See https://developer.cisco.com/docs/mobility-services/api-lifecycle
133+
rpc GetActiveDatasets(GetActiveDatasetsRequest) returns (GetActiveDatasetsResponse) {
134+
option (status) = BETA;
135+
option (scope) = "";
136+
}
137+
138+
}
139+
140+
// Dataset represents a dataset in the IR21 database. A dataset is identified by a UUID and has a name as metadata.
141+
message Dataset {
142+
bytes uuid = 1;
143+
string comment = 2;
144+
}
145+
146+
// Request message to list datasets.
147+
message ListDatasetsRequest {
148+
}
149+
150+
// Response message for list datasets.
151+
message ListDatasetsResponse {
152+
repeated Dataset datasets = 1;
153+
}
154+
155+
// Request message to set the active dataset for a tenant.
156+
message SetActiveDatasetRequest {
157+
bytes dataset_uuid = 1;
158+
repeated bytes tenant_uuids = 2;
159+
}
160+
161+
// Response message for set active dataset for tenant.
162+
message SetActiveDatasetResponse {
163+
repeated ActiveDataset active_datasets = 1;
164+
}
165+
166+
// Request message to create a dataset.
167+
message CreateDatasetRequest {
168+
bytes uuid = 1; // if uuid is empty, generates uuid and returns it.
169+
string comment = 2;
170+
}
171+
172+
// Response message for create dataset.
173+
message CreateDatasetResponse {
174+
bytes uuid = 1;
175+
}
176+
177+
// Request message to delete a dataset. The dataset is identified by its UUID.
178+
message DeleteDatasetRequest {
179+
bytes uuid = 1;
180+
}
181+
182+
// Response message for delete dataset.
183+
message DeleteDatasetResponse {
184+
bytes uuid = 1;
185+
}
186+
187+
// Request message to copy a dataset.
188+
message CopyDatasetRequest {
189+
bytes source_uuid = 1;
190+
bytes destination_uuid = 2; // if empty, generates uuid and returns it.
191+
string comment = 3;
192+
}
193+
194+
// Response message for copy dataset.
195+
message CopyDatasetResponse {
196+
bytes uuid = 1;
197+
}
198+
199+
// Request message to create or update an organisation in the IR21 database.
200+
message CreateOrUpdateOrganisationRequest {
201+
bytes dataset_uuid = 1;
202+
Organisation organisation = 2;
203+
}
204+
205+
// Response message for create or update organisation.
206+
message CreateOrUpdateOrganisationResponse {
207+
bytes uuid = 1;
208+
}
209+
210+
// Request message to create or update an organisation from an XML file in the IR21 database.
211+
message CreateOrUpdateOrganisationFromXmlRequest {
212+
bytes dataset_uuid = 1;
213+
bytes xml_file = 2;
214+
string comment = 3;
215+
}
216+
217+
// Response message for create or update organisation from XML.
218+
message CreateOrUpdateOrganisationFromXmlResponse {
219+
bytes uuid = 1;
220+
}
221+
222+
// Request message to delete an organisation from the IR21 database.
223+
message DeleteOrganisationRequest {
224+
bytes dataset_uuid = 1;
225+
bytes organisation_uuid = 2;
226+
}
227+
228+
// Response message for delete organisation.
229+
message DeleteOrganisationResponse {
230+
bytes uuid = 1;
231+
}
232+
233+
// Request message to list organisations from a dataset in the IR21 database.
234+
message ListOrganisationsRequest {
235+
bytes dataset_uuid = 1;
236+
// TODO: add fields for filters
237+
}
238+
239+
// Response message for list organisations. Returns the dataset metadata and a list of organisations containing IR.21
240+
// data.
241+
message ListOrganisationsResponse {
242+
Dataset dataset = 1;
243+
repeated Organisation organisations = 2;
244+
}
245+
246+
// Request message to get an organisation from the IR21 database.
247+
message GetOrganisationRequest {
248+
bytes dataset_uuid = 1;
249+
bytes organisation_uuid = 2;
250+
}
251+
252+
// Response message for get organisation.
253+
message GetOrganisationResponse {
254+
Organisation organisation = 1;
255+
}
256+
257+
// Request message to get active datasets.
258+
message GetActiveDatasetsRequest {
259+
}
260+
261+
// Response message for get active datasets.
262+
message GetActiveDatasetsResponse {
263+
repeated ActiveDataset active_datasets = 1;
264+
}
265+
266+
// Indicates which dataset is currently active for a tenant.
267+
message ActiveDataset {
268+
bytes dataset_uuid = 1;
269+
bytes tenant_uuid = 2;
270+
}
271+
272+
// Organisation represents an organisation in the IR21 database. An organisation has a UUID, name, country, country
273+
// initials, TADIGs, MCCMNCs, GT prefixes, realms, and a comment. If the UUID is not set, it is generated by the server.
274+
// If UUID was in the request, it is treated as an Update, otherwise as a Create.
275+
message Organisation {
276+
bytes uuid = 1; // Unique identifier for the organisation. If empty, a UUID will be generated.
277+
string name = 2; // Name of the organisation.
278+
string country_name = 3; // Human-readable name of the country. For example, 'Norway'.
279+
string country_initials = 4; // Three-letter country initials from RAEX IR.21. Examples: 'AAM', 'AAZ', 'NOR', 'USA'.
280+
repeated Tadig tadigs = 5; // List of TADIGs associated with the organisation.
281+
string comment = 6; // Additional comments or notes about the organisation.
282+
}
283+
284+
message Tadig {
285+
string tadig = 1; // TADIG code for the network.
286+
repeated wgtwo.common.v1.NetworkIdentity mccmncs = 2; // List of MCCMNCs associated with this TADIG.
287+
repeated string realms = 3; // List of realms associated with the MCCMNCs.
288+
repeated string gt_prefixes = 4; // List of GT prefixes associated with the MCCMNCs.
289+
}

0 commit comments

Comments
 (0)