This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

SPEKTRA Edge Cellular Service API

Understanding the Cellular service API.
  • 1:

Full API Specifications (with resources):

  • Version v1

1 -

Understanding the cellular-api.edgelq.com service APIv1, in proto package ntt.cellular_api.v1.

Service cellular-api.edgelq.com in version v1, proto package ntt.cellular_api.v1

Here is the list of resources supported in CellularApi service APIv1:

Contract Resource

Contract Resource

Name patterns:

  • contracts/{contract}

This section covers the methods and messages to interact with Contract resource.

Contract Methods

Here is the list of Contract resource methods:

GetContract Method

GetContract

rpc GetContract(GetContractRequest) returns (Contract)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.get

The equivalent REST API is:

GET /v1/{name=contracts/*} 

BatchGetContracts Method

BatchGetContracts

rpc BatchGetContracts(BatchGetContractsRequest) returns (BatchGetContractsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.batchGet

The equivalent REST API is:

GET /v1/contracts:batchGet 

ListContracts Method

ListContracts

rpc ListContracts(ListContractsRequest) returns (ListContractsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.list

The equivalent REST API is:

GET /v1/contracts 

WatchContract Method

WatchContract

rpc WatchContract(WatchContractRequest) returns (WatchContractResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.watch

The equivalent REST API is:

POST /v1/{name=contracts/*}:watch 

WatchContracts Method

WatchContracts

rpc WatchContracts(WatchContractsRequest) returns (WatchContractsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.watch

The equivalent REST API is:

POST /v1/contracts:watch 

CreateContract Method

CreateContract

rpc CreateContract(CreateContractRequest) returns (Contract)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.create

The equivalent REST API is:

POST /v1/contracts (BODY: contract)

UpdateContract Method

UpdateContract

rpc UpdateContract(UpdateContractRequest) returns (Contract)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.update

The equivalent REST API is:

PUT /v1/{contract.name=contracts/*} (BODY: contract)

DeleteContract Method

DeleteContract

rpc DeleteContract(DeleteContractRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/contracts.delete

The equivalent REST API is:

DELETE /v1/{name=contracts/*} 

Contract Messages

Here is the list of Contract resource messages:

Contract Message

NameTypeDescription
namestring (name of Contract)Name of Contract When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
rate_planstring
transatelstring (reference to Secret)
ciscostring (reference to Secret)
celonastring (reference to Secret)

GetContractRequest Message

A request message of the GetContract method.

NameTypeDescription
namestring (name of Contract)Name of ntt.cellular_api.v1.Contract
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetContractsRequest Message

A request message of the BatchGetContracts method.

NameTypeDescription
namesrepeated string (name of Contract)Names of Contracts
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetContractsResponse Message

A response message of the BatchGetContracts method.

NameTypeDescription
contractsrepeated Contractfound Contracts
missingrepeated string (name of Contract)list of not found Contracts

ListContractsRequest Message

A request message of the ListContracts method.

NameTypeDescription
page_sizeint32Requested page size. Server may return fewer Contracts than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Contract)A token identifying a page of results the server should return. Typically, this is the value of ListContractsResponse.next_page_token.
order_bystring (orderBy of Contract)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Contract)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListContractsResponse Message

A response message of the ListContracts method.

NameTypeDescription
contractsrepeated ContractThe list of Contracts
prev_page_tokenstring (cursor of Contract)A token to retrieve previous page of results. Pass this value in the ListContractsRequest.page_token.
next_page_tokenstring (cursor of Contract)A token to retrieve next page of results. Pass this value in the ListContractsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Contracts across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchContractRequest Message

A request message of the WatchContract method.

NameTypeDescription
namestring (name of Contract)Name of ntt.cellular_api.v1.Contract
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchContractResponse Message

A response message of the WatchContract method.

NameTypeDescription
changeContractChange

WatchContractsRequest Message

A request message of the WatchContracts method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
page_sizeint32Requested page size. Server may return fewer Contracts than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Contract)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Contract)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Contract)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Contract that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Contract that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchContractsResponse Message

A response message of the WatchContracts method.

NameTypeDescription
contract_changesrepeated ContractChangeChanges of Contracts
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Contracts will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchContractsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Contracts will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchContractsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Contract)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Contract)New token to retrieve next page of results.

CreateContractRequest Message

A request message of the CreateContract method.

NameTypeDescription
contractContractContract resource body
response_maskCreateContractRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateContractRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateContractRequest Message

A request message of the UpdateContract method.

NameTypeDescription
contractContractContract resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateContractRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateContractRequest.ResponseMaskreduce message response size.

UpdateContractRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateContractConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateContractRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteContractRequest Message

A request message of the DeleteContract method.

NameTypeDescription
namestring (name of Contract)Name of ntt.cellular_api.v1.Contract
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SimCard Resource

SimCard Resource

Name patterns:

  • projects/{project}/regions/{region}/simCards/{sim_card}

Parent resources:

This section covers the methods and messages to interact with SimCard resource.

SimCard Methods

Here is the list of SimCard resource methods:

GetSimCard Method

GetSimCard

rpc GetSimCard(GetSimCardRequest) returns (SimCard)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.get

The equivalent REST API is:

GET /v1/{name=projects/*/regions/*/simCards/*} 

BatchGetSimCards Method

BatchGetSimCards

rpc BatchGetSimCards(BatchGetSimCardsRequest) returns (BatchGetSimCardsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.batchGet

The equivalent REST API is:

GET /v1/simCards:batchGet 

ListSimCards Method

ListSimCards

rpc ListSimCards(ListSimCardsRequest) returns (ListSimCardsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.list

The equivalent REST API is:

GET /v1/{parent=projects/*/regions/*}/simCards 

WatchSimCard Method

WatchSimCard

rpc WatchSimCard(WatchSimCardRequest) returns (WatchSimCardResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.watch

The equivalent REST API is:

POST /v1/{name=projects/*/regions/*/simCards/*}:watch 

WatchSimCards Method

WatchSimCards

rpc WatchSimCards(WatchSimCardsRequest) returns (WatchSimCardsResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/regions/*}/simCards:watch 

CreateSimCard Method

CreateSimCard

rpc CreateSimCard(CreateSimCardRequest) returns (SimCard)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.create

The equivalent REST API is:

POST /v1/{parent=projects/*/regions/*}/simCards (BODY: sim_card)

UpdateSimCard Method

UpdateSimCard

rpc UpdateSimCard(UpdateSimCardRequest) returns (SimCard)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.update

The equivalent REST API is:

PUT /v1/{sim_card.name=projects/*/regions/*/simCards/*} (BODY: sim_card)

DeleteSimCard Method

DeleteSimCard

rpc DeleteSimCard(DeleteSimCardRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/regions/*/simCards/*} 

Activate Method

Activate

rpc Activate(ActivateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.activate

The equivalent REST API is:

POST /v1/{name=projects/*/regions/*/simCards/*}:activate 

Suspend Method

Suspend

rpc Suspend(SuspendRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.suspend

The equivalent REST API is:

POST /v1/{name=projects/*/regions/*/simCards/*}:suspend 

Terminate Method

Terminate

rpc Terminate(TerminateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.terminate

The equivalent REST API is:

POST /v1/{name=projects/*/regions/*/simCards/*}:terminate 

Reactivate Method

Reactivate

rpc Reactivate(ReactivateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCards.reactivate

The equivalent REST API is:

POST /v1/{name=projects/*/regions/*/simCards/*}:reactivate 

SimCard Messages

Here is the list of SimCard resource messages:

SimCard Message

NameTypeDescription
namestring (name of SimCard)Name of SimCard When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: \d{19}
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
contractstring (reference to Contract)
imsistring
rate_planstring
statusSimCard.Status

SimCard.Status Message

NameTypeDescription
state.ntt.cellular_api.carrier.SimState
errorstring

GetSimCardRequest Message

A request message of the GetSimCard method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetSimCardsRequest Message

A request message of the BatchGetSimCards method.

NameTypeDescription
namesrepeated string (name of SimCard)Names of SimCards
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetSimCardsResponse Message

A response message of the BatchGetSimCards method.

NameTypeDescription
sim_cardsrepeated SimCardfound SimCards
missingrepeated string (name of SimCard)list of not found SimCards

ListSimCardsRequest Message

A request message of the ListSimCards method.

NameTypeDescription
parentstring (parent name of SimCard)Parent name of ntt.cellular_api.v1.SimCard
page_sizeint32Requested page size. Server may return fewer SimCards than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of SimCard)A token identifying a page of results the server should return. Typically, this is the value of ListSimCardsResponse.next_page_token.
order_bystring (orderBy of SimCard)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of SimCard)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListSimCardsResponse Message

A response message of the ListSimCards method.

NameTypeDescription
sim_cardsrepeated SimCardThe list of SimCards
prev_page_tokenstring (cursor of SimCard)A token to retrieve previous page of results. Pass this value in the ListSimCardsRequest.page_token.
next_page_tokenstring (cursor of SimCard)A token to retrieve next page of results. Pass this value in the ListSimCardsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total SimCards across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchSimCardRequest Message

A request message of the WatchSimCard method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchSimCardResponse Message

A response message of the WatchSimCard method.

NameTypeDescription
changeSimCardChange

WatchSimCardsRequest Message

A request message of the WatchSimCards method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of SimCard)Parent name of ntt.cellular_api.v1.SimCard
page_sizeint32Requested page size. Server may return fewer SimCards than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of SimCard)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of SimCard)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of SimCard)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to SimCard that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to SimCard that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchSimCardsResponse Message

A response message of the WatchSimCards method.

NameTypeDescription
sim_card_changesrepeated SimCardChangeChanges of SimCards
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All SimCards will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchSimCardsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (SimCards will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchSimCardsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of SimCard)New token to retrieve previous page of results.
next_page_tokenstring (cursor of SimCard)New token to retrieve next page of results.

CreateSimCardRequest Message

A request message of the CreateSimCard method.

NameTypeDescription
parentstring (parent name of SimCard)Parent name of ntt.cellular_api.v1.SimCard
sim_cardSimCardSimCard resource body
response_maskCreateSimCardRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateSimCardRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateSimCardRequest Message

A request message of the UpdateSimCard method.

NameTypeDescription
sim_cardSimCardSimCard resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateSimCardRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateSimCardRequest.ResponseMaskreduce message response size.

UpdateSimCardRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateSimCardConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateSimCardRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteSimCardRequest Message

A request message of the DeleteSimCard method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

ActivateRequest Message

A request message of the Activate method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
projectstring (name of Project)

SuspendRequest Message

A request message of the Suspend method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
projectstring (name of Project)

TerminateRequest Message

A request message of the Terminate method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
projectstring (name of Project)

ReactivateRequest Message

A request message of the Reactivate method.

NameTypeDescription
namestring (name of SimCard)Name of ntt.cellular_api.v1.SimCard
projectstring (name of Project)

SimCardStock Resource

SimCardStock Resource

Name patterns:

  • simCardStocks/{sim_card_stock}

This section covers the methods and messages to interact with SimCardStock resource.

SimCardStock Methods

Here is the list of SimCardStock resource methods:

GetSimCardStock Method

GetSimCardStock

rpc GetSimCardStock(GetSimCardStockRequest) returns (SimCardStock)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.get

The equivalent REST API is:

GET /v1/{name=simCardStocks/*} 

BatchGetSimCardStocks Method

BatchGetSimCardStocks

rpc BatchGetSimCardStocks(BatchGetSimCardStocksRequest) returns (BatchGetSimCardStocksResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.batchGet

The equivalent REST API is:

GET /v1/simCardStocks:batchGet 

ListSimCardStocks Method

ListSimCardStocks

rpc ListSimCardStocks(ListSimCardStocksRequest) returns (ListSimCardStocksResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.list

The equivalent REST API is:

GET /v1/simCardStocks 

WatchSimCardStock Method

WatchSimCardStock

rpc WatchSimCardStock(WatchSimCardStockRequest) returns (WatchSimCardStockResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.watch

The equivalent REST API is:

POST /v1/{name=simCardStocks/*}:watch 

WatchSimCardStocks Method

WatchSimCardStocks

rpc WatchSimCardStocks(WatchSimCardStocksRequest) returns (WatchSimCardStocksResponse)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.watch

The equivalent REST API is:

POST /v1/simCardStocks:watch 

CreateSimCardStock Method

CreateSimCardStock

rpc CreateSimCardStock(CreateSimCardStockRequest) returns (SimCardStock)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.create

The equivalent REST API is:

POST /v1/simCardStocks (BODY: sim_card_stock)

UpdateSimCardStock Method

UpdateSimCardStock

rpc UpdateSimCardStock(UpdateSimCardStockRequest) returns (SimCardStock)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.update

The equivalent REST API is:

PUT /v1/{sim_card_stock.name=simCardStocks/*} (BODY: sim_card_stock)

DeleteSimCardStock Method

DeleteSimCardStock

rpc DeleteSimCardStock(DeleteSimCardStockRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.delete

The equivalent REST API is:

DELETE /v1/{name=simCardStocks/*} 

Allocate Method

Allocate

rpc Allocate(AllocateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.allocate

The equivalent REST API is:

POST /v1/{name=simCardStocks/*}:allocate 

Deallocate Method

Deallocate

rpc Deallocate(DeallocateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/cellular-api.edgelq.com/permissions/simCardStocks.deallocate

The equivalent REST API is:

POST /v1/{name=simCardStocks/*}:deallocate 

SimCardStock Messages

Here is the list of SimCardStock resource messages:

SimCardStock Message

NameTypeDescription
namestring (name of SimCardStock)Name of SimCardStock When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: \d{19}
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
contractstring (reference to Contract)
stateSimCardStock.State
sim_cardstring (reference to SimCard)

GetSimCardStockRequest Message

A request message of the GetSimCardStock method.

NameTypeDescription
namestring (name of SimCardStock)Name of ntt.cellular_api.v1.SimCardStock
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetSimCardStocksRequest Message

A request message of the BatchGetSimCardStocks method.

NameTypeDescription
namesrepeated string (name of SimCardStock)Names of SimCardStocks
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetSimCardStocksResponse Message

A response message of the BatchGetSimCardStocks method.

NameTypeDescription
sim_card_stocksrepeated SimCardStockfound SimCardStocks
missingrepeated string (name of SimCardStock)list of not found SimCardStocks

ListSimCardStocksRequest Message

A request message of the ListSimCardStocks method.

NameTypeDescription
page_sizeint32Requested page size. Server may return fewer SimCardStocks than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of SimCardStock)A token identifying a page of results the server should return. Typically, this is the value of ListSimCardStocksResponse.next_page_token.
order_bystring (orderBy of SimCardStock)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of SimCardStock)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListSimCardStocksResponse Message

A response message of the ListSimCardStocks method.

NameTypeDescription
sim_card_stocksrepeated SimCardStockThe list of SimCardStocks
prev_page_tokenstring (cursor of SimCardStock)A token to retrieve previous page of results. Pass this value in the ListSimCardStocksRequest.page_token.
next_page_tokenstring (cursor of SimCardStock)A token to retrieve next page of results. Pass this value in the ListSimCardStocksRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total SimCardStocks across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchSimCardStockRequest Message

A request message of the WatchSimCardStock method.

NameTypeDescription
namestring (name of SimCardStock)Name of ntt.cellular_api.v1.SimCardStock
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchSimCardStockResponse Message

A response message of the WatchSimCardStock method.

NameTypeDescription
changeSimCardStockChange

WatchSimCardStocksRequest Message

A request message of the WatchSimCardStocks method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
page_sizeint32Requested page size. Server may return fewer SimCardStocks than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of SimCardStock)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of SimCardStock)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of SimCardStock)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to SimCardStock that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to SimCardStock that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchSimCardStocksResponse Message

A response message of the WatchSimCardStocks method.

NameTypeDescription
sim_card_stock_changesrepeated SimCardStockChangeChanges of SimCardStocks
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All SimCardStocks will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchSimCardStocksResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (SimCardStocks will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchSimCardStocksResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of SimCardStock)New token to retrieve previous page of results.
next_page_tokenstring (cursor of SimCardStock)New token to retrieve next page of results.

CreateSimCardStockRequest Message

A request message of the CreateSimCardStock method.

NameTypeDescription
sim_card_stockSimCardStockSimCardStock resource body
response_maskCreateSimCardStockRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateSimCardStockRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateSimCardStockRequest Message

A request message of the UpdateSimCardStock method.

NameTypeDescription
sim_card_stockSimCardStockSimCardStock resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateSimCardStockRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateSimCardStockRequest.ResponseMaskreduce message response size.

UpdateSimCardStockRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateSimCardStockConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateSimCardStockRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteSimCardStockRequest Message

A request message of the DeleteSimCardStock method.

NameTypeDescription
namestring (name of SimCardStock)Name of ntt.cellular_api.v1.SimCardStock
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

AllocateRequest Message

A request message of the Allocate method.

NameTypeDescription
namestring (name of SimCardStock)Name of ntt.cellular_api.v1.SimCardStock
projectstring (reference to Project)
region_idstring
state.ntt.cellular_api.carrier.SimStateexpected state just after allocated if unspecified, will try to transit to ACTIVE

DeallocateRequest Message

A request message of the Deallocate method.

NameTypeDescription
namestring (name of SimCardStock)Name of ntt.cellular_api.v1.SimCardStock
sim_cardstring (reference to SimCard)
state.ntt.cellular_api.carrier.SimStateexpected state just after deallocated if unspecified, will try to transit to SUSPENDED

SimCardStock Enumerations

Here is the list of SimCardStock resource enumerations:

SimCardStock.State Enumeration

NameDescription
STATE_UNSPECIFIED
AVAILABLE
IN_USE

CellularApi Service Shared Methods and Messages

CellularApi Service Shared Messages

Here is the list of CellularApi service shared messages:

ContractChange Message

ContractChange is used by Watch notifications Responses to describe change of single Contract One of Added, Modified, Removed

NameTypeDescription
addedContractChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedContractChange.ModifiedModified is returned when watched document is modified
currentContractChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedContractChange.RemovedRemoved is returned when Contract is deleted or leaves Query view

ContractChange.Added Message

Contract has been added to query view

NameTypeDescription
contractContract
view_indexint32Integer describing index of added Contract in resulting query view.

ContractChange.Current Message

Contract has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
contractContract

ContractChange.Modified Message

Contract changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Contract)Name of modified Contract
contractContractNew version of Contract or masked difference, depending on mask_changes instrumentation of issued [WatchContractRequest] or [WatchContractsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Contract. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Contract new index in resulting query view.

ContractChange.Removed Message

Removed is returned when Contract is deleted or leaves Query view

NameTypeDescription
namestring (name of Contract)
view_indexint32Integer specifying removed Contract index. Not populated in stateless watch type.

SimCardChange Message

SimCardChange is used by Watch notifications Responses to describe change of single SimCard One of Added, Modified, Removed

NameTypeDescription
addedSimCardChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedSimCardChange.ModifiedModified is returned when watched document is modified
currentSimCardChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedSimCardChange.RemovedRemoved is returned when SimCard is deleted or leaves Query view

SimCardChange.Added Message

SimCard has been added to query view

NameTypeDescription
sim_cardSimCard
view_indexint32Integer describing index of added SimCard in resulting query view.

SimCardChange.Current Message

SimCard has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
sim_cardSimCard

SimCardChange.Modified Message

SimCard changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of SimCard)Name of modified SimCard
sim_cardSimCardNew version of SimCard or masked difference, depending on mask_changes instrumentation of issued [WatchSimCardRequest] or [WatchSimCardsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified SimCard. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying SimCard new index in resulting query view.

SimCardChange.Removed Message

Removed is returned when SimCard is deleted or leaves Query view

NameTypeDescription
namestring (name of SimCard)
view_indexint32Integer specifying removed SimCard index. Not populated in stateless watch type.

SimCardStockChange Message

SimCardStockChange is used by Watch notifications Responses to describe change of single SimCardStock One of Added, Modified, Removed

NameTypeDescription
addedSimCardStockChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedSimCardStockChange.ModifiedModified is returned when watched document is modified
currentSimCardStockChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedSimCardStockChange.RemovedRemoved is returned when SimCardStock is deleted or leaves Query view

SimCardStockChange.Added Message

SimCardStock has been added to query view

NameTypeDescription
sim_card_stockSimCardStock
view_indexint32Integer describing index of added SimCardStock in resulting query view.

SimCardStockChange.Current Message

SimCardStock has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
sim_card_stockSimCardStock

SimCardStockChange.Modified Message

SimCardStock changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of SimCardStock)Name of modified SimCardStock
sim_card_stockSimCardStockNew version of SimCardStock or masked difference, depending on mask_changes instrumentation of issued [WatchSimCardStockRequest] or [WatchSimCardStocksRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified SimCardStock. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying SimCardStock new index in resulting query view.

SimCardStockChange.Removed Message

Removed is returned when SimCardStock is deleted or leaves Query view

NameTypeDescription
namestring (name of SimCardStock)
view_indexint32Integer specifying removed SimCardStock index. Not populated in stateless watch type.