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

Name Type Description
name string (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]
metadata Meta Metadata 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_plan string
transatel string (reference to Secret)
cisco string (reference to Secret)
celona string (reference to Secret)

GetContractRequest Message

A request message of the GetContract method.

Name Type Description
name string (name of Contract) Name of ntt.cellular_api.v1.Contract
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
names repeated string (name of Contract) Names of Contracts
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
contracts repeated Contract found Contracts
missing repeated string (name of Contract) list of not found Contracts

ListContractsRequest Message

A request message of the ListContracts method.

Name Type Description
page_size int32 Requested page size. Server may return fewer Contracts than requested. If unspecified, server will pick an appropriate default.
page_token string (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_by string (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”
filter string (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.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_info bool Indicates 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.

Name Type Description
contracts repeated Contract The list of Contracts
prev_page_token string (cursor of Contract) A token to retrieve previous page of results. Pass this value in the ListContractsRequest.page_token.
next_page_token string (cursor of Contract) A token to retrieve next page of results. Pass this value in the ListContractsRequest.page_token.
current_offset int32 Current 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_count int32 Number 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.

Name Type Description
name string (name of Contract) Name of ntt.cellular_api.v1.Contract
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
change ContractChange

WatchContractsRequest Message

A request message of the WatchContracts method.

Name Type Description
type WatchType Type 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_size int32 Requested 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_token string (cursor of Contract) A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_by string (orderBy of Contract) Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_token string A token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time .google.protobuf.Timestamp Point 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.
filter string (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.FieldMask A 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.
view View View 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_size int32 Maximum 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.

Name Type Description
contract_changes repeated ContractChange Changes of Contracts
is_current bool If 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_change WatchContractsResponse.PageTokenChange When present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_token string Token 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_size int64 Server 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_reset bool In 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_reset bool In 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

Name Type Description
prev_page_token string (cursor of Contract) New token to retrieve previous page of results.
next_page_token string (cursor of Contract) New token to retrieve next page of results.

CreateContractRequest Message

A request message of the CreateContract method.

Name Type Description
contract Contract Contract resource body
response_mask CreateContractRequest.ResponseMask Optional masking applied to response object to reduce message response size.

CreateContractRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If this flag has value true, then response will contain just empty resource without any fields populated.
body_mask .google.protobuf.FieldMask If this field is populated, then resource in response will contain only specific fields.

UpdateContractRequest Message

A request message of the UpdateContract method.

Name Type Description
contract Contract Contract resource body
update_mask .google.protobuf.FieldMask FieldMask applied to request - change will be applied only for fields in the mask
cas UpdateContractRequest.CAS Conditional 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_missing bool If 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_mask UpdateContractRequest.ResponseMask reduce 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.

Name Type Description
conditional_state Contract Conditional desired state of a resource before update.
field_mask .google.protobuf.FieldMask Field paths from conditional state of resource server should check and compare.

UpdateContractRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If 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_only bool Include 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.FieldMask If 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.

Name Type Description
name string (name of Contract) Name of ntt.cellular_api.v1.Contract
allow_missing bool If 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

Name Type Description
name string (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}
metadata Meta Metadata 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).
contract string (reference to Contract)
imsi string
rate_plan string
status SimCard.Status

SimCard.Status Message

Name Type Description
state .ntt.cellular_api.carrier.SimState
error string

GetSimCardRequest Message

A request message of the GetSimCard method.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
names repeated string (name of SimCard) Names of SimCards
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
sim_cards repeated SimCard found SimCards
missing repeated string (name of SimCard) list of not found SimCards

ListSimCardsRequest Message

A request message of the ListSimCards method.

Name Type Description
parent string (parent name of SimCard) Parent name of ntt.cellular_api.v1.SimCard
page_size int32 Requested page size. Server may return fewer SimCards than requested. If unspecified, server will pick an appropriate default.
page_token string (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_by string (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”
filter string (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.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_info bool Indicates 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.

Name Type Description
sim_cards repeated SimCard The list of SimCards
prev_page_token string (cursor of SimCard) A token to retrieve previous page of results. Pass this value in the ListSimCardsRequest.page_token.
next_page_token string (cursor of SimCard) A token to retrieve next page of results. Pass this value in the ListSimCardsRequest.page_token.
current_offset int32 Current 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_count int32 Number 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.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
change SimCardChange

WatchSimCardsRequest Message

A request message of the WatchSimCards method.

Name Type Description
type WatchType Type 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.
parent string (parent name of SimCard) Parent name of ntt.cellular_api.v1.SimCard
page_size int32 Requested 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_token string (cursor of SimCard) A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_by string (orderBy of SimCard) Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_token string A token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time .google.protobuf.Timestamp Point 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.
filter string (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.FieldMask A 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.
view View View 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_size int32 Maximum 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.

Name Type Description
sim_card_changes repeated SimCardChange Changes of SimCards
is_current bool If 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_change WatchSimCardsResponse.PageTokenChange When present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_token string Token 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_size int64 Server 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_reset bool In 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_reset bool In 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

Name Type Description
prev_page_token string (cursor of SimCard) New token to retrieve previous page of results.
next_page_token string (cursor of SimCard) New token to retrieve next page of results.

CreateSimCardRequest Message

A request message of the CreateSimCard method.

Name Type Description
parent string (parent name of SimCard) Parent name of ntt.cellular_api.v1.SimCard
sim_card SimCard SimCard resource body
response_mask CreateSimCardRequest.ResponseMask Optional masking applied to response object to reduce message response size.

CreateSimCardRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If this flag has value true, then response will contain just empty resource without any fields populated.
body_mask .google.protobuf.FieldMask If this field is populated, then resource in response will contain only specific fields.

UpdateSimCardRequest Message

A request message of the UpdateSimCard method.

Name Type Description
sim_card SimCard SimCard resource body
update_mask .google.protobuf.FieldMask FieldMask applied to request - change will be applied only for fields in the mask
cas UpdateSimCardRequest.CAS Conditional 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_missing bool If 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_mask UpdateSimCardRequest.ResponseMask reduce 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.

Name Type Description
conditional_state SimCard Conditional desired state of a resource before update.
field_mask .google.protobuf.FieldMask Field paths from conditional state of resource server should check and compare.

UpdateSimCardRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If 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_only bool Include 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.FieldMask If 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.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
allow_missing bool If 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.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
project string (name of Project)

SuspendRequest Message

A request message of the Suspend method.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
project string (name of Project)

TerminateRequest Message

A request message of the Terminate method.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
project string (name of Project)

ReactivateRequest Message

A request message of the Reactivate method.

Name Type Description
name string (name of SimCard) Name of ntt.cellular_api.v1.SimCard
project string (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

Name Type Description
name string (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}
metadata Meta Metadata 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).
contract string (reference to Contract)
state SimCardStock.State
sim_card string (reference to SimCard)

GetSimCardStockRequest Message

A request message of the GetSimCardStock method.

Name Type Description
name string (name of SimCardStock) Name of ntt.cellular_api.v1.SimCardStock
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
names repeated string (name of SimCardStock) Names of SimCardStocks
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
sim_card_stocks repeated SimCardStock found SimCardStocks
missing repeated string (name of SimCardStock) list of not found SimCardStocks

ListSimCardStocksRequest Message

A request message of the ListSimCardStocks method.

Name Type Description
page_size int32 Requested page size. Server may return fewer SimCardStocks than requested. If unspecified, server will pick an appropriate default.
page_token string (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_by string (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”
filter string (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.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_info bool Indicates 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.

Name Type Description
sim_card_stocks repeated SimCardStock The list of SimCardStocks
prev_page_token string (cursor of SimCardStock) A token to retrieve previous page of results. Pass this value in the ListSimCardStocksRequest.page_token.
next_page_token string (cursor of SimCardStock) A token to retrieve next page of results. Pass this value in the ListSimCardStocksRequest.page_token.
current_offset int32 Current 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_count int32 Number 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.

Name Type Description
name string (name of SimCardStock) Name of ntt.cellular_api.v1.SimCardStock
field_mask .google.protobuf.FieldMask A list of extra fields to be obtained for each response item on top of fields defined by request field view
view View View 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.

Name Type Description
change SimCardStockChange

WatchSimCardStocksRequest Message

A request message of the WatchSimCardStocks method.

Name Type Description
type WatchType Type 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_size int32 Requested 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_token string (cursor of SimCardStock) A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_by string (orderBy of SimCardStock) Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_token string A token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time .google.protobuf.Timestamp Point 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.
filter string (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.FieldMask A 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.
view View View 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_size int32 Maximum 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.

Name Type Description
sim_card_stock_changes repeated SimCardStockChange Changes of SimCardStocks
is_current bool If 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_change WatchSimCardStocksResponse.PageTokenChange When present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_token string Token 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_size int64 Server 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_reset bool In 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_reset bool In 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

Name Type Description
prev_page_token string (cursor of SimCardStock) New token to retrieve previous page of results.
next_page_token string (cursor of SimCardStock) New token to retrieve next page of results.

CreateSimCardStockRequest Message

A request message of the CreateSimCardStock method.

Name Type Description
sim_card_stock SimCardStock SimCardStock resource body
response_mask CreateSimCardStockRequest.ResponseMask Optional masking applied to response object to reduce message response size.

CreateSimCardStockRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If this flag has value true, then response will contain just empty resource without any fields populated.
body_mask .google.protobuf.FieldMask If this field is populated, then resource in response will contain only specific fields.

UpdateSimCardStockRequest Message

A request message of the UpdateSimCardStock method.

Name Type Description
sim_card_stock SimCardStock SimCardStock resource body
update_mask .google.protobuf.FieldMask FieldMask applied to request - change will be applied only for fields in the mask
cas UpdateSimCardStockRequest.CAS Conditional 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_missing bool If 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_mask UpdateSimCardStockRequest.ResponseMask reduce 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.

Name Type Description
conditional_state SimCardStock Conditional desired state of a resource before update.
field_mask .google.protobuf.FieldMask Field paths from conditional state of resource server should check and compare.

UpdateSimCardStockRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

Name Type Description
skip_entire_response_body bool If 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_only bool Include 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.FieldMask If 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.

Name Type Description
name string (name of SimCardStock) Name of ntt.cellular_api.v1.SimCardStock
allow_missing bool If 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.

Name Type Description
name string (name of SimCardStock) Name of ntt.cellular_api.v1.SimCardStock
project string (reference to Project)
region_id string
state .ntt.cellular_api.carrier.SimState expected state just after allocated if unspecified, will try to transit to ACTIVE

DeallocateRequest Message

A request message of the Deallocate method.

Name Type Description
name string (name of SimCardStock) Name of ntt.cellular_api.v1.SimCardStock
sim_card string (reference to SimCard)
state .ntt.cellular_api.carrier.SimState expected 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

Name Description
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

Name Type Description
added ContractChange.Added Added is returned when watched document is added, either created or enters Query view
modified ContractChange.Modified Modified is returned when watched document is modified
current ContractChange.Current Current is returned in stateless watch when document enters query view or is modified within.
removed ContractChange.Removed Removed is returned when Contract is deleted or leaves Query view

ContractChange.Added Message

Contract has been added to query view

Name Type Description
contract Contract
view_index int32 Integer 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

Name Type Description
contract Contract

ContractChange.Modified Message

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

Name Type Description
name string (name of Contract) Name of modified Contract
contract Contract New version of Contract or masked difference, depending on mask_changes instrumentation of issued [WatchContractRequest] or [WatchContractsRequest]
field_mask .google.protobuf.FieldMask Used when mask_changes is set, contains field paths of modified properties.
previous_view_index int32 Previous view index specifies previous position of modified Contract. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_index int32 Integer specifying Contract new index in resulting query view.

ContractChange.Removed Message

Removed is returned when Contract is deleted or leaves Query view

Name Type Description
name string (name of Contract)
view_index int32 Integer 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

Name Type Description
added SimCardChange.Added Added is returned when watched document is added, either created or enters Query view
modified SimCardChange.Modified Modified is returned when watched document is modified
current SimCardChange.Current Current is returned in stateless watch when document enters query view or is modified within.
removed SimCardChange.Removed Removed is returned when SimCard is deleted or leaves Query view

SimCardChange.Added Message

SimCard has been added to query view

Name Type Description
sim_card SimCard
view_index int32 Integer 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

Name Type Description
sim_card SimCard

SimCardChange.Modified Message

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

Name Type Description
name string (name of SimCard) Name of modified SimCard
sim_card SimCard New version of SimCard or masked difference, depending on mask_changes instrumentation of issued [WatchSimCardRequest] or [WatchSimCardsRequest]
field_mask .google.protobuf.FieldMask Used when mask_changes is set, contains field paths of modified properties.
previous_view_index int32 Previous view index specifies previous position of modified SimCard. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_index int32 Integer specifying SimCard new index in resulting query view.

SimCardChange.Removed Message

Removed is returned when SimCard is deleted or leaves Query view

Name Type Description
name string (name of SimCard)
view_index int32 Integer 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

Name Type Description
added SimCardStockChange.Added Added is returned when watched document is added, either created or enters Query view
modified SimCardStockChange.Modified Modified is returned when watched document is modified
current SimCardStockChange.Current Current is returned in stateless watch when document enters query view or is modified within.
removed SimCardStockChange.Removed Removed is returned when SimCardStock is deleted or leaves Query view

SimCardStockChange.Added Message

SimCardStock has been added to query view

Name Type Description
sim_card_stock SimCardStock
view_index int32 Integer 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

Name Type Description
sim_card_stock SimCardStock

SimCardStockChange.Modified Message

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

Name Type Description
name string (name of SimCardStock) Name of modified SimCardStock
sim_card_stock SimCardStock New version of SimCardStock or masked difference, depending on mask_changes instrumentation of issued [WatchSimCardStockRequest] or [WatchSimCardStocksRequest]
field_mask .google.protobuf.FieldMask Used when mask_changes is set, contains field paths of modified properties.
previous_view_index int32 Previous view index specifies previous position of modified SimCardStock. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_index int32 Integer specifying SimCardStock new index in resulting query view.

SimCardStockChange.Removed Message

Removed is returned when SimCardStock is deleted or leaves Query view

Name Type Description
name string (name of SimCardStock)
view_index int32 Integer specifying removed SimCardStock index. Not populated in stateless watch type.