Skip to content

Instantly share code, notes, and snippets.

@diericx
Created July 10, 2019 02:09
Show Gist options
  • Save diericx/683f275b82315cbe725f447c8fa2975c to your computer and use it in GitHub Desktop.
Save diericx/683f275b82315cbe725f447c8fa2975c to your computer and use it in GitHub Desktop.
apis:
- methods:
- name: CreateEntity
requestTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.CreateEntityRequest
responseTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.CreateEntityResponse
- name: GetEntity
requestTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.GetEntityRequest
responseTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.GetEntityResponse
- name: DeleteEntity
requestTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.DeleteEntityRequest
responseTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.DeleteEntityResponse
- name: ExecuteAgentAction
requestTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.ExecuteAgentActionRequest
responseTypeUrl: type.googleapis.com/endpoints.terrariumai.environment.ExecuteAgentActionResponse
- name: ResetWorld
requestTypeUrl: type.googleapis.com/google.protobuf.Empty
responseTypeUrl: type.googleapis.com/google.protobuf.Empty
name: endpoints.terrariumai.environment.Environment
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
version: v1
authentication:
providers:
- id: firebase
issuer: https://securetoken.google.com/olamai-d64a7
jwksUri: https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com
rules:
- requirements:
- providerId: firebase
selector: endpoints.terrariumai.environment.Environment.CreateEntity
- requirements:
- providerId: firebase
selector: endpoints.terrariumai.environment.Environment.GetEntity
- requirements:
- providerId: firebase
selector: endpoints.terrariumai.environment.Environment.DeleteEntity
- requirements:
- providerId: firebase
selector: endpoints.terrariumai.environment.Environment.ExecuteAgentAction
- requirements:
- providerId: firebase
selector: endpoints.terrariumai.environment.Environment.ResetWorld
backend:
rules:
- selector: endpoints.terrariumai.environment.Environment.CreateEntity
- selector: endpoints.terrariumai.environment.Environment.GetEntity
- selector: endpoints.terrariumai.environment.Environment.DeleteEntity
- selector: endpoints.terrariumai.environment.Environment.ExecuteAgentAction
- selector: endpoints.terrariumai.environment.Environment.ResetWorld
configVersion: 3
control:
environment: servicecontrol.googleapis.com
documentation:
rules:
- description: |-
A generic empty message that you can re-use to avoid defining duplicated
empty messages in your APIs. A typical example is to use it as the request
or the response type of an API method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
The JSON representation for `Empty` is empty JSON object `{}`.
selector: google.protobuf.Empty
- description: Taks we have to do
selector: endpoints.terrariumai.environment.Entity
- description: Unique integer identifier of the agent
selector: endpoints.terrariumai.environment.Entity.id
- description: Entity stats
selector: endpoints.terrariumai.environment.Entity.class
- description: Owner details
selector: endpoints.terrariumai.environment.Entity.ownerUID
- description: Request data to create new agent
selector: endpoints.terrariumai.environment.CreateEntityRequest
- description: agent
selector: endpoints.terrariumai.environment.CreateEntityRequest.entity
- description: Contains data of created agent
selector: endpoints.terrariumai.environment.CreateEntityResponse
- description: ID of created agent
selector: endpoints.terrariumai.environment.CreateEntityResponse.id
- description: Request data to read entity
selector: endpoints.terrariumai.environment.GetEntityRequest
- description: Unique integer identifier of the agent
selector: endpoints.terrariumai.environment.GetEntityRequest.id
- description: Contains entity data specified in by ID request
selector: endpoints.terrariumai.environment.GetEntityResponse
- description: Task entity read by ID
selector: endpoints.terrariumai.environment.GetEntityResponse.entity
- description: Request data to delete agent
selector: endpoints.terrariumai.environment.DeleteEntityRequest
- description: Unique integer identifier of the agent to delete
selector: endpoints.terrariumai.environment.DeleteEntityRequest.id
- description: Contains status of delete operation
selector: endpoints.terrariumai.environment.DeleteEntityResponse
- description: |-
Contains number of entities have beed deleted
Equals 1 in case of successful delete
selector: endpoints.terrariumai.environment.DeleteEntityResponse.deleted
- description: Id for the agent that should perform the action
selector: endpoints.terrariumai.environment.ExecuteAgentActionRequest.id
- description: |-
identifier for the action
0: MOVE
1: EAT
selector: endpoints.terrariumai.environment.ExecuteAgentActionRequest.action
- description: |-
direction to perform the action in
0: UP
1: DOWN
2: LEFT
3: RIGHT
selector: endpoints.terrariumai.environment.ExecuteAgentActionRequest.direction
- description: Was the agent able to perform the action
selector: endpoints.terrariumai.environment.ExecuteAgentActionResponse.wasSuccessful
- description: Service to manage simulation
selector: endpoints.terrariumai.environment.Environment
- description: Create new agent
selector: endpoints.terrariumai.environment.Environment.CreateEntity
- description: Get data for an entity
selector: endpoints.terrariumai.environment.Environment.GetEntity
- description: Delete an agent
selector: endpoints.terrariumai.environment.Environment.DeleteEntity
- description: Perform an action for an agent
selector: endpoints.terrariumai.environment.Environment.ExecuteAgentAction
- description: Reset the world
selector: endpoints.terrariumai.environment.Environment.ResetWorld
endpoints:
- features:
- googleapis.com/endpoint/grpc-autobahn
name: environment.endpoints.olamai-d64a7.cloud.goog
http: {}
id: 2019-07-08r1
legacy:
apiV1Name: environment.endpoints.olamai-d64a7.cloud.goog
logging:
producerDestinations:
- logs:
- endpoints_log
monitoredResource: api
logs:
- name: endpoints_log
metrics:
- labels:
- key: /credential_id
- key: /protocol
- key: /response_code
- key: /response_code_class
- key: /status_code
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/request_count
type: serviceruntime.googleapis.com/api/consumer/request_count
valueType: INT64
- labels:
- key: /credential_id
- key: /error_type
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/error_count
type: serviceruntime.googleapis.com/api/consumer/error_count
valueType: INT64
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/total_latencies
type: serviceruntime.googleapis.com/api/consumer/total_latencies
valueType: DISTRIBUTION
- labels:
- key: /protocol
- key: /response_code
- key: /response_code_class
- key: /status_code
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/request_count
type: serviceruntime.googleapis.com/api/producer/request_count
valueType: INT64
- labels:
- key: /error_type
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/error_count
type: serviceruntime.googleapis.com/api/producer/error_count
valueType: INT64
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/total_latencies
type: serviceruntime.googleapis.com/api/producer/total_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
- key: /end_user
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user
type: serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user
valueType: INT64
- labels:
- key: /credential_id
- key: /end_user_country
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user_country
type: serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user_country
valueType: INT64
- labels:
- key: /credential_id
- key: /referer
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/top_request_count_by_referer
type: serviceruntime.googleapis.com/api/consumer/top_request_count_by_referer
valueType: INT64
- labels:
- key: /protocol
- key: /response_code
- key: /consumer_id
- key: /status_code
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/top_request_count_by_consumer
type: serviceruntime.googleapis.com/api/producer/top_request_count_by_consumer
valueType: INT64
- labels:
- key: /credential_id
- key: /quota_group_name
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/quota_used_count
type: serviceruntime.googleapis.com/api/consumer/quota_used_count
valueType: INT64
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/request_overhead_latencies
type: serviceruntime.googleapis.com/api/consumer/request_overhead_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/backend_latencies
type: serviceruntime.googleapis.com/api/consumer/backend_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/request_sizes
type: serviceruntime.googleapis.com/api/consumer/request_sizes
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/response_sizes
type: serviceruntime.googleapis.com/api/consumer/response_sizes
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/request_overhead_latencies
type: serviceruntime.googleapis.com/api/producer/request_overhead_latencies
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/backend_latencies
type: serviceruntime.googleapis.com/api/producer/backend_latencies
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/request_sizes
type: serviceruntime.googleapis.com/api/producer/request_sizes
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/response_sizes
type: serviceruntime.googleapis.com/api/producer/response_sizes
valueType: DISTRIBUTION
- labels:
- key: /consumer_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/top_request_sizes_by_consumer
type: serviceruntime.googleapis.com/api/producer/top_request_sizes_by_consumer
valueType: DISTRIBUTION
- labels:
- key: /consumer_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/top_response_sizes_by_consumer
type: serviceruntime.googleapis.com/api/producer/top_response_sizes_by_consumer
valueType: DISTRIBUTION
- labels:
- key: /credential_id
- key: /protocol
- key: /response_code
- key: /response_code_class
- key: /status_code
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/request_count
type: serviceruntime.googleapis.com/api/producer/by_consumer/request_count
valueType: INT64
- labels:
- key: /credential_id
- key: /error_type
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/error_count
type: serviceruntime.googleapis.com/api/producer/by_consumer/error_count
valueType: INT64
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/total_latencies
type: serviceruntime.googleapis.com/api/producer/by_consumer/total_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
- key: /quota_group_name
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/quota_used_count
type: serviceruntime.googleapis.com/api/producer/by_consumer/quota_used_count
valueType: INT64
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/request_overhead_latencies
type: serviceruntime.googleapis.com/api/producer/by_consumer/request_overhead_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/backend_latencies
type: serviceruntime.googleapis.com/api/producer/by_consumer/backend_latencies
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/request_sizes
type: serviceruntime.googleapis.com/api/producer/by_consumer/request_sizes
valueType: DISTRIBUTION
- labels:
- key: /credential_id
metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/by_consumer/response_sizes
type: serviceruntime.googleapis.com/api/producer/by_consumer/response_sizes
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/streaming_request_message_counts
type: serviceruntime.googleapis.com/api/producer/streaming_request_message_counts
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/streaming_response_message_counts
type: serviceruntime.googleapis.com/api/producer/streaming_response_message_counts
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/streaming_request_message_counts
type: serviceruntime.googleapis.com/api/consumer/streaming_request_message_counts
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/streaming_response_message_counts
type: serviceruntime.googleapis.com/api/consumer/streaming_response_message_counts
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/streaming_durations
type: serviceruntime.googleapis.com/api/producer/streaming_durations
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/streaming_durations
type: serviceruntime.googleapis.com/api/consumer/streaming_durations
valueType: DISTRIBUTION
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/request_bytes
type: serviceruntime.googleapis.com/api/producer/request_bytes
valueType: INT64
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/producer/response_bytes
type: serviceruntime.googleapis.com/api/producer/response_bytes
valueType: INT64
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/request_bytes
type: serviceruntime.googleapis.com/api/consumer/request_bytes
valueType: INT64
- metricKind: DELTA
name: serviceruntime.googleapis.com/api/consumer/response_bytes
type: serviceruntime.googleapis.com/api/consumer/response_bytes
valueType: INT64
monitoredResources:
- labels:
- key: cloud.googleapis.com/location
- key: cloud.googleapis.com/uid
- key: serviceruntime.googleapis.com/api_version
- key: serviceruntime.googleapis.com/api_method
- key: serviceruntime.googleapis.com/consumer_project
- key: cloud.googleapis.com/project
- key: cloud.googleapis.com/service
type: api
monitoring:
consumerDestinations:
- metrics:
- serviceruntime.googleapis.com/api/consumer/request_count
- serviceruntime.googleapis.com/api/consumer/error_count
- serviceruntime.googleapis.com/api/consumer/quota_used_count
- serviceruntime.googleapis.com/api/consumer/total_latencies
- serviceruntime.googleapis.com/api/consumer/request_overhead_latencies
- serviceruntime.googleapis.com/api/consumer/backend_latencies
- serviceruntime.googleapis.com/api/consumer/request_sizes
- serviceruntime.googleapis.com/api/consumer/response_sizes
- serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user
- serviceruntime.googleapis.com/api/consumer/top_request_count_by_end_user_country
- serviceruntime.googleapis.com/api/consumer/top_request_count_by_referer
- serviceruntime.googleapis.com/api/consumer/streaming_request_message_counts
- serviceruntime.googleapis.com/api/consumer/streaming_response_message_counts
- serviceruntime.googleapis.com/api/consumer/streaming_durations
- serviceruntime.googleapis.com/api/consumer/request_bytes
- serviceruntime.googleapis.com/api/consumer/response_bytes
monitoredResource: api
producerDestinations:
- metrics:
- serviceruntime.googleapis.com/api/producer/request_count
- serviceruntime.googleapis.com/api/producer/error_count
- serviceruntime.googleapis.com/api/producer/total_latencies
- serviceruntime.googleapis.com/api/producer/request_overhead_latencies
- serviceruntime.googleapis.com/api/producer/backend_latencies
- serviceruntime.googleapis.com/api/producer/request_sizes
- serviceruntime.googleapis.com/api/producer/response_sizes
- serviceruntime.googleapis.com/api/producer/top_request_count_by_consumer
- serviceruntime.googleapis.com/api/producer/top_request_sizes_by_consumer
- serviceruntime.googleapis.com/api/producer/top_response_sizes_by_consumer
- serviceruntime.googleapis.com/api/producer/streaming_request_message_counts
- serviceruntime.googleapis.com/api/producer/streaming_response_message_counts
- serviceruntime.googleapis.com/api/producer/streaming_durations
- serviceruntime.googleapis.com/api/producer/request_bytes
- serviceruntime.googleapis.com/api/producer/response_bytes
- serviceruntime.googleapis.com/api/producer/by_consumer/request_count
- serviceruntime.googleapis.com/api/producer/by_consumer/error_count
- serviceruntime.googleapis.com/api/producer/by_consumer/total_latencies
- serviceruntime.googleapis.com/api/producer/by_consumer/quota_used_count
- serviceruntime.googleapis.com/api/producer/by_consumer/request_overhead_latencies
- serviceruntime.googleapis.com/api/producer/by_consumer/backend_latencies
- serviceruntime.googleapis.com/api/producer/by_consumer/request_sizes
- serviceruntime.googleapis.com/api/producer/by_consumer/response_sizes
monitoredResource: api
name: environment.endpoints.olamai-d64a7.cloud.goog
producerProjectId: olamai-d64a7
systemParameters: {}
title: Environment gRPC API
types:
- name: google.protobuf.Empty
sourceContext:
fileName: google/protobuf/empty.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: id
kind: TYPE_STRING
name: id
number: 1
- cardinality: CARDINALITY_OPTIONAL
jsonName: class
kind: TYPE_INT32
name: class
number: 2
- cardinality: CARDINALITY_OPTIONAL
jsonName: x
kind: TYPE_INT32
name: x
number: 3
- cardinality: CARDINALITY_OPTIONAL
jsonName: y
kind: TYPE_INT32
name: y
number: 4
- cardinality: CARDINALITY_OPTIONAL
jsonName: energy
kind: TYPE_INT32
name: energy
number: 5
- cardinality: CARDINALITY_OPTIONAL
jsonName: health
kind: TYPE_INT32
name: health
number: 6
- cardinality: CARDINALITY_OPTIONAL
jsonName: ownerUID
kind: TYPE_STRING
name: ownerUID
number: 7
- cardinality: CARDINALITY_OPTIONAL
jsonName: modelID
kind: TYPE_STRING
name: modelID
number: 8
name: endpoints.terrariumai.environment.Entity
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: entity
kind: TYPE_MESSAGE
name: entity
number: 1
typeUrl: type.googleapis.com/endpoints.terrariumai.environment.Entity
name: endpoints.terrariumai.environment.CreateEntityRequest
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: id
kind: TYPE_STRING
name: id
number: 1
name: endpoints.terrariumai.environment.CreateEntityResponse
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: id
kind: TYPE_STRING
name: id
number: 1
name: endpoints.terrariumai.environment.GetEntityRequest
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: entity
kind: TYPE_MESSAGE
name: entity
number: 1
typeUrl: type.googleapis.com/endpoints.terrariumai.environment.Entity
name: endpoints.terrariumai.environment.GetEntityResponse
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: id
kind: TYPE_STRING
name: id
number: 1
name: endpoints.terrariumai.environment.DeleteEntityRequest
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: deleted
kind: TYPE_INT64
name: deleted
number: 1
name: endpoints.terrariumai.environment.DeleteEntityResponse
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: id
kind: TYPE_STRING
name: id
number: 1
- cardinality: CARDINALITY_OPTIONAL
jsonName: action
kind: TYPE_UINT32
name: action
number: 2
- cardinality: CARDINALITY_OPTIONAL
jsonName: direction
kind: TYPE_UINT32
name: direction
number: 3
name: endpoints.terrariumai.environment.ExecuteAgentActionRequest
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
- fields:
- cardinality: CARDINALITY_OPTIONAL
jsonName: wasSuccessful
kind: TYPE_BOOL
name: wasSuccessful
number: 3
name: endpoints.terrariumai.environment.ExecuteAgentActionResponse
sourceContext:
fileName: environment.proto
syntax: SYNTAX_PROTO3
usage:
rules:
- allowUnregisteredCalls: true
selector: endpoints.terrariumai.environment.Environment.CreateEntity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment