1/*
2 * Copyright (C) 2020 Google LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16syntax = "proto2";
17
18package com.google.carrier;
19
20option java_multiple_files = true;
21option java_outer_classname = "CarrierListProtos";
22
23// The carrier ID is matched against SIM data to determine carrier
24message CarrierId {
25  // Mobile Country Code (MCC) & Mobile Network Code (MNC)
26  optional string mcc_mnc = 1;
27
28  // Additional data to identify MVNO
29  oneof mvno_data {
30    // SPN (Service Provider Name)
31    string spn = 2;
32
33    // IMSI prefix pattern
34    string imsi = 3;
35
36    // Group identifier (level 1) prefix
37    string gid1 = 4;
38  }
39
40  reserved 5;
41}
42
43// Maps CarrierIds to an internal unique carrier name
44message CarrierMap {
45  // A unique canonical carrier name
46  // This name is the primary key to identify a carrier
47  // Typically a canonical_name looks like <carrier_name>_<iso_country_code>
48  optional string canonical_name = 1;
49
50  // A collection of network IDs owned by this carrier
51  repeated CarrierId carrier_id = 2;
52
53  reserved 3;
54}
55
56// Maps CarrierId to internal unique carrier name
57message CarrierList {
58  // A collection of carrier maps; one entry for one carrier
59  repeated CarrierMap entry = 1;
60
61  // The version number of this CarrierList file
62  optional int64 version = 2;
63}
64