From 9e845ab6ac0e830c9670bddaf68363e4c67ab641 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 26 May 2021 12:50:02 -0400 Subject: [PATCH] chore: remove duplicate copies of protos (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #173 ☕️ --- .../proto/google/api/attribute_context.proto | 343 ------------------ .../src/main/proto/google/api/audit_log.proto | 270 -------------- .../proto/google/api/calendar_period.proto | 56 --- .../src/main/proto/google/api/code.proto | 186 ---------- .../src/main/proto/google/api/color.proto | 174 --------- .../src/main/proto/google/api/date.proto | 52 --- .../src/main/proto/google/api/datetime.proto | 104 ------ .../src/main/proto/google/api/dayofweek.proto | 50 --- .../src/main/proto/google/api/decimal.proto | 95 ----- .../main/proto/google/api/error_details.proto | 249 ------------- .../src/main/proto/google/api/expr.proto | 73 ---- .../src/main/proto/google/api/fraction.proto | 33 -- .../main/proto/google/api/http_request.proto | 96 ----- .../src/main/proto/google/api/interval.proto | 46 --- .../src/main/proto/google/api/latlng.proto | 37 -- .../proto/google/api/localized_text.proto | 36 -- .../main/proto/google/api/log_severity.proto | 72 ---- .../src/main/proto/google/api/money.proto | 42 --- .../src/main/proto/google/api/month.proto | 65 ---- .../main/proto/google/api/operations.proto | 247 ------------- .../main/proto/google/api/phone_number.proto | 113 ------ .../proto/google/api/postal_address.proto | 134 ------- .../main/proto/google/api/quaternion.proto | 94 ----- .../src/main/proto/google/api/status.proto | 47 --- .../src/main/proto/google/api/timeofday.proto | 44 --- .../src/main/proto/google/api/viewport.proto | 69 ---- synth.py | 2 +- 27 files changed, 1 insertion(+), 2828 deletions(-) delete mode 100644 proto-google-common-protos/src/main/proto/google/api/attribute_context.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/audit_log.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/calendar_period.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/code.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/color.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/date.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/datetime.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/dayofweek.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/decimal.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/error_details.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/expr.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/fraction.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/http_request.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/interval.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/latlng.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/localized_text.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/log_severity.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/money.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/month.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/operations.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/phone_number.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/postal_address.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/quaternion.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/status.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/timeofday.proto delete mode 100644 proto-google-common-protos/src/main/proto/google/api/viewport.proto diff --git a/proto-google-common-protos/src/main/proto/google/api/attribute_context.proto b/proto-google-common-protos/src/main/proto/google/api/attribute_context.proto deleted file mode 100644 index 30fe6f25..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/attribute_context.proto +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc.context; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/context/attribute_context;attribute_context"; -option java_multiple_files = true; -option java_outer_classname = "AttributeContextProto"; -option java_package = "com.google.rpc.context"; - -// This message defines the standard attribute vocabulary for Google APIs. -// -// An attribute is a piece of metadata that describes an activity on a network -// service. For example, the size of an HTTP request, or the status code of -// an HTTP response. -// -// Each attribute has a type and a name, which is logically defined as -// a proto message field in `AttributeContext`. The field type becomes the -// attribute type, and the field path becomes the attribute name. For example, -// the attribute `source.ip` maps to field `AttributeContext.source.ip`. -// -// This message definition is guaranteed not to have any wire breaking change. -// So you can use it directly for passing attributes across different systems. -// -// NOTE: Different system may generate different subset of attributes. Please -// verify the system specification before relying on an attribute generated -// a system. -message AttributeContext { - // This message defines attributes for a node that handles a network request. - // The node can be either a service or an application that sends, forwards, - // or receives the request. Service peers should fill in - // `principal` and `labels` as appropriate. - message Peer { - // The IP address of the peer. - string ip = 1; - - // The network port of the peer. - int64 port = 2; - - // The labels associated with the peer. - map labels = 6; - - // The identity of this peer. Similar to `Request.auth.principal`, but - // relative to the peer instead of the request. For example, the - // idenity associated with a load balancer that forwared the request. - string principal = 7; - - // The CLDR country/region code associated with the above IP address. - // If the IP address is private, the `region_code` should reflect the - // physical location where this peer is running. - string region_code = 8; - } - - // This message defines attributes associated with API operations, such as - // a network API request. The terminology is based on the conventions used - // by Google APIs, Istio, and OpenAPI. - message Api { - // The API service name. It is a logical identifier for a networked API, - // such as "pubsub.googleapis.com". The naming syntax depends on the - // API management system being used for handling the request. - string service = 1; - - // The API operation name. For gRPC requests, it is the fully qualified API - // method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI - // requests, it is the `operationId`, such as "getPet". - string operation = 2; - - // The API protocol used for sending the request, such as "http", "https", - // "grpc", or "internal". - string protocol = 3; - - // The API version associated with the API operation above, such as "v1" or - // "v1alpha1". - string version = 4; - } - - // This message defines request authentication attributes. Terminology is - // based on the JSON Web Token (JWT) standard, but the terms also - // correlate to concepts in other standards. - message Auth { - // The authenticated principal. Reflects the issuer (`iss`) and subject - // (`sub`) claims within a JWT. The issuer and subject should be `/` - // delimited, with `/` percent-encoded within the subject fragment. For - // Google accounts, the principal format is: - // "https://accounts.google.com/{id}" - string principal = 1; - - // The intended audience(s) for this authentication information. Reflects - // the audience (`aud`) claim within a JWT. The audience - // value(s) depends on the `issuer`, but typically include one or more of - // the following pieces of information: - // - // * The services intended to receive the credential. For example, - // ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"]. - // * A set of service-based scopes. For example, - // ["https://www.googleapis.com/auth/cloud-platform"]. - // * The client id of an app, such as the Firebase project id for JWTs - // from Firebase Auth. - // - // Consult the documentation for the credential issuer to determine the - // information provided. - repeated string audiences = 2; - - // The authorized presenter of the credential. Reflects the optional - // Authorized Presenter (`azp`) claim within a JWT or the - // OAuth client id. For example, a Google Cloud Platform client id looks - // as follows: "123456789012.apps.googleusercontent.com". - string presenter = 3; - - // Structured claims presented with the credential. JWTs include - // `{key: value}` pairs for standard and private claims. The following - // is a subset of the standard required and optional claims that would - // typically be presented for a Google-based JWT: - // - // {'iss': 'accounts.google.com', - // 'sub': '113289723416554971153', - // 'aud': ['123456789012', 'pubsub.googleapis.com'], - // 'azp': '123456789012.apps.googleusercontent.com', - // 'email': 'jsmith@example.com', - // 'iat': 1353601026, - // 'exp': 1353604926} - // - // SAML assertions are similarly specified, but with an identity provider - // dependent structure. - google.protobuf.Struct claims = 4; - - // A list of access level resource names that allow resources to be - // accessed by authenticated requester. It is part of Secure GCP processing - // for the incoming request. An access level string has the format: - // "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" - // - // Example: - // "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL" - repeated string access_levels = 5; - } - - // This message defines attributes for an HTTP request. If the actual - // request is not an HTTP request, the runtime system should try to map - // the actual request to an equivalent HTTP request. - message Request { - // The unique ID for a request, which can be propagated to downstream - // systems. The ID should have low probability of collision - // within a single day for a specific service. - string id = 1; - - // The HTTP request method, such as `GET`, `POST`. - string method = 2; - - // The HTTP request headers. If multiple headers share the same key, they - // must be merged according to the HTTP spec. All header keys must be - // lowercased, because HTTP header keys are case-insensitive. - map headers = 3; - - // The HTTP URL path. - string path = 4; - - // The HTTP request `Host` header value. - string host = 5; - - // The HTTP URL scheme, such as `http` and `https`. - string scheme = 6; - - // The HTTP URL query in the format of `name1=value1&name2=value2`, as it - // appears in the first line of the HTTP request. No decoding is performed. - string query = 7; - - // The timestamp when the `destination` service receives the last byte of - // the request. - google.protobuf.Timestamp time = 9; - - // The HTTP request size in bytes. If unknown, it must be -1. - int64 size = 10; - - // The network protocol used with the request, such as "http/1.1", - // "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See - // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids - // for details. - string protocol = 11; - - // A special parameter for request reason. It is used by security systems - // to associate auditing information with a request. - string reason = 12; - - // The request authentication. May be absent for unauthenticated requests. - // Derived from the HTTP request `Authorization` header or equivalent. - Auth auth = 13; - } - - // This message defines attributes for a typical network response. It - // generally models semantics of an HTTP response. - message Response { - // The HTTP response status code, such as `200` and `404`. - int64 code = 1; - - // The HTTP response size in bytes. If unknown, it must be -1. - int64 size = 2; - - // The HTTP response headers. If multiple headers share the same key, they - // must be merged according to HTTP spec. All header keys must be - // lowercased, because HTTP header keys are case-insensitive. - map headers = 3; - - // The timestamp when the `destination` service sends the last byte of - // the response. - google.protobuf.Timestamp time = 4; - - // The length of time it takes the backend service to fully respond to a - // request. Measured from when the destination service starts to send the - // request to the backend until when the destination service receives the - // complete response from the backend. - google.protobuf.Duration backend_latency = 5; - } - - // This message defines core attributes for a resource. A resource is an - // addressable (named) entity provided by the destination service. For - // example, a file stored on a network storage service. - message Resource { - // The name of the service that this resource belongs to, such as - // `pubsub.googleapis.com`. The service may be different from the DNS - // hostname that actually serves the request. - string service = 1; - - // The stable identifier (name) of a resource on the `service`. A resource - // can be logically identified as "//{resource.service}/{resource.name}". - // The differences between a resource name and a URI are: - // - // * Resource name is a logical identifier, independent of network - // protocol and API version. For example, - // `//pubsub.googleapis.com/projects/123/topics/news-feed`. - // * URI often includes protocol and version information, so it can - // be used directly by applications. For example, - // `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. - // - // See https://cloud.google.com/apis/design/resource_names for details. - string name = 2; - - // The type of the resource. The syntax is platform-specific because - // different platforms define their resources differently. - // - // For Google APIs, the type format must be "{service}/{kind}". - string type = 3; - - // The labels or tags on the resource, such as AWS resource tags and - // Kubernetes resource labels. - map labels = 4; - - // The unique identifier of the resource. UID is unique in the time - // and space for this resource within the scope of the service. It is - // typically generated by the server on successful creation of a resource - // and must not be changed. UID is used to uniquely identify resources - // with resource name reuses. This should be a UUID4. - string uid = 5; - - // Annotations is an unstructured key-value map stored with a resource that - // may be set by external tools to store and retrieve arbitrary metadata. - // They are not queryable and should be preserved when modifying objects. - // - // More info: https://kubernetes.io/docs/user-guide/annotations - map annotations = 6; - - // Mutable. The display name set by clients. Must be <= 63 characters. - string display_name = 7; - - // Output only. The timestamp when the resource was created. This may - // be either the time creation was initiated or when it was completed. - google.protobuf.Timestamp create_time = 8; - - // Output only. The timestamp when the resource was last updated. Any - // change to the resource made by users must refresh this value. - // Changes to a resource made by the service should refresh this value. - google.protobuf.Timestamp update_time = 9; - - // Output only. The timestamp when the resource was deleted. - // If the resource is not deleted, this must be empty. - google.protobuf.Timestamp delete_time = 10; - - // Output only. An opaque value that uniquely identifies a version or - // generation of a resource. It can be used to confirm that the client - // and server agree on the ordering of a resource being written. - string etag = 11; - - // Immutable. The location of the resource. The location encoding is - // specific to the service provider, and new encoding may be introduced - // as the service evolves. - // - // For Google Cloud products, the encoding is what is used by Google Cloud - // APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The - // semantics of `location` is identical to the - // `cloud.googleapis.com/location` label used by some Google Cloud APIs. - string location = 12; - } - - // The origin of a network activity. In a multi hop network activity, - // the origin represents the sender of the first hop. For the first hop, - // the `source` and the `origin` must have the same content. - Peer origin = 7; - - // The source of a network activity, such as starting a TCP connection. - // In a multi hop network activity, the source represents the sender of the - // last hop. - Peer source = 1; - - // The destination of a network activity, such as accepting a TCP connection. - // In a multi hop network activity, the destination represents the receiver of - // the last hop. - Peer destination = 2; - - // Represents a network request, such as an HTTP request. - Request request = 3; - - // Represents a network response, such as an HTTP response. - Response response = 4; - - // Represents a target resource that is involved with a network activity. - // If multiple resources are involved with an activity, this must be the - // primary one. - Resource resource = 5; - - // Represents an API operation that is involved to a network activity. - Api api = 6; - - // Supports extensions for advanced use cases, such as logs and metrics. - repeated google.protobuf.Any extensions = 8; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/audit_log.proto b/proto-google-common-protos/src/main/proto/google/api/audit_log.proto deleted file mode 100644 index 66ea0214..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/audit_log.proto +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.audit; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/rpc/context/attribute_context.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/audit;audit"; -option java_multiple_files = true; -option java_outer_classname = "AuditLogProto"; -option java_package = "com.google.cloud.audit"; - -// Common audit log format for Google Cloud Platform API operations. -message AuditLog { - // The name of the API service performing the operation. For example, - // `"datastore.googleapis.com"`. - string service_name = 7; - - // The name of the service method or operation. - // For API calls, this should be the name of the API method. - // For example, - // - // "google.datastore.v1.Datastore.RunQuery" - // "google.logging.v1.LoggingService.DeleteLog" - string method_name = 8; - - // The resource or collection that is the target of the operation. - // The name is a scheme-less URI, not including the API service name. - // For example: - // - // "shelves/SHELF_ID/books" - // "shelves/SHELF_ID/books/BOOK_ID" - string resource_name = 11; - - // The resource location information. - ResourceLocation resource_location = 20; - - // The resource's original state before mutation. Present only for - // operations which have successfully modified the targeted resource(s). - // In general, this field should contain all changed fields, except those - // that are already been included in `request`, `response`, `metadata` or - // `service_data` fields. - // When the JSON object represented here has a proto equivalent, - // the proto name will be indicated in the `@type` property. - google.protobuf.Struct resource_original_state = 19; - - // The number of items returned from a List or Query API method, - // if applicable. - int64 num_response_items = 12; - - // The status of the overall operation. - google.rpc.Status status = 2; - - // Authentication information. - AuthenticationInfo authentication_info = 3; - - // Authorization information. If there are multiple - // resources or permissions involved, then there is - // one AuthorizationInfo element for each {resource, permission} tuple. - repeated AuthorizationInfo authorization_info = 9; - - // Metadata about the operation. - RequestMetadata request_metadata = 4; - - // The operation request. This may not include all request parameters, - // such as those that are too large, privacy-sensitive, or duplicated - // elsewhere in the log record. - // It should never include user-generated data, such as file contents. - // When the JSON object represented here has a proto equivalent, the proto - // name will be indicated in the `@type` property. - google.protobuf.Struct request = 16; - - // The operation response. This may not include all response elements, - // such as those that are too large, privacy-sensitive, or duplicated - // elsewhere in the log record. - // It should never include user-generated data, such as file contents. - // When the JSON object represented here has a proto equivalent, the proto - // name will be indicated in the `@type` property. - google.protobuf.Struct response = 17; - - // Other service-specific data about the request, response, and other - // information associated with the current audited event. - google.protobuf.Struct metadata = 18; - - // Deprecated, use `metadata` field instead. - // Other service-specific data about the request, response, and other - // activities. - google.protobuf.Any service_data = 15; -} - -// Authentication information for the operation. -message AuthenticationInfo { - // The email address of the authenticated user (or service account on behalf - // of third party principal) making the request. For privacy reasons, the - // principal email address is redacted for all read-only operations that fail - // with a "permission denied" error. - string principal_email = 1; - - // The authority selector specified by the requestor, if any. - // It is not guaranteed that the principal was allowed to use this authority. - string authority_selector = 2; - - // The third party identification (if any) of the authenticated user making - // the request. - // When the JSON object represented here has a proto equivalent, the proto - // name will be indicated in the `@type` property. - google.protobuf.Struct third_party_principal = 4; - - // The name of the service account key used to create or exchange - // credentials for authenticating the service account making the request. - // This is a scheme-less URI full resource name. For example: - // - // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" - string service_account_key_name = 5; - - // Identity delegation history of an authenticated service account that makes - // the request. It contains information on the real authorities that try to - // access GCP resources by delegating on a service account. When multiple - // authorities present, they are guaranteed to be sorted based on the original - // ordering of the identity delegation events. - repeated ServiceAccountDelegationInfo service_account_delegation_info = 6; - - // String representation of identity of requesting party. - // Populated for both first and third party identities. - string principal_subject = 8; -} - -// Authorization information for the operation. -message AuthorizationInfo { - // The resource being accessed, as a REST-style string. For example: - // - // bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID - string resource = 1; - - // The required IAM permission. - string permission = 2; - - // Whether or not authorization for `resource` and `permission` - // was granted. - bool granted = 3; - - // Resource attributes used in IAM condition evaluation. This field contains - // resource attributes like resource type and resource name. - // - // To get the whole view of the attributes used in IAM - // condition evaluation, the user must also look into - // `AuditLog.request_metadata.request_attributes`. - google.rpc.context.AttributeContext.Resource resource_attributes = 5; -} - -// Metadata about the request. -message RequestMetadata { - // The IP address of the caller. - // For caller from internet, this will be public IPv4 or IPv6 address. - // For caller from a Compute Engine VM with external IP address, this - // will be the VM's external IP address. For caller from a Compute - // Engine VM without external IP address, if the VM is in the same - // organization (or project) as the accessed resource, `caller_ip` will - // be the VM's internal IPv4 address, otherwise the `caller_ip` will be - // redacted to "gce-internal-ip". - // See https://cloud.google.com/compute/docs/vpc/ for more information. - string caller_ip = 1; - - // The user agent of the caller. - // This information is not authenticated and should be treated accordingly. - // For example: - // - // + `google-api-python-client/1.4.0`: - // The request was made by the Google API client for Python. - // + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - // The request was made by the Google Cloud SDK CLI (gcloud). - // + `AppEngine-Google; (+http://code.google.com/appengine; appid: - // s~my-project`: - // The request was made from the `my-project` App Engine app. - string caller_supplied_user_agent = 2; - - // The network of the caller. - // Set only if the network host project is part of the same GCP organization - // (or project) as the accessed resource. - // See https://cloud.google.com/compute/docs/vpc/ for more information. - // This is a scheme-less URI full resource name. For example: - // - // "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" - string caller_network = 3; - - // Request attributes used in IAM condition evaluation. This field contains - // request attributes like request time and access levels associated with - // the request. - // - // - // To get the whole view of the attributes used in IAM - // condition evaluation, the user must also look into - // `AuditLog.authentication_info.resource_attributes`. - google.rpc.context.AttributeContext.Request request_attributes = 7; - - // The destination of a network activity, such as accepting a TCP connection. - // In a multi hop network activity, the destination represents the receiver of - // the last hop. Only two fields are used in this message, Peer.port and - // Peer.ip. These fields are optionally populated by those services utilizing - // the IAM condition feature. - google.rpc.context.AttributeContext.Peer destination_attributes = 8; -} - -// Location information about a resource. -message ResourceLocation { - // The locations of a resource after the execution of the operation. - // Requests to create or delete a location based resource must populate - // the 'current_locations' field and not the 'original_locations' field. - // For example: - // - // "europe-west1-a" - // "us-east1" - // "nam3" - repeated string current_locations = 1; - - // The locations of a resource prior to the execution of the operation. - // Requests that mutate the resource's location must populate both the - // 'original_locations' as well as the 'current_locations' fields. - // For example: - // - // "europe-west1-a" - // "us-east1" - // "nam3" - repeated string original_locations = 2; -} - -// Identity delegation history of an authenticated service account. -message ServiceAccountDelegationInfo { - // First party identity principal. - message FirstPartyPrincipal { - // The email address of a Google account. - string principal_email = 1; - - // Metadata about the service that uses the service account. - google.protobuf.Struct service_metadata = 2; - } - - // Third party identity principal. - message ThirdPartyPrincipal { - // Metadata about third party identity. - google.protobuf.Struct third_party_claims = 1; - } - - // Entity that creates credentials for service account and assumes its - // identity for authentication. - oneof Authority { - // First party (Google) identity as the real authority. - FirstPartyPrincipal first_party_principal = 1; - - // Third party identity as the real authority. - ThirdPartyPrincipal third_party_principal = 2; - } -} diff --git a/proto-google-common-protos/src/main/proto/google/api/calendar_period.proto b/proto-google-common-protos/src/main/proto/google/api/calendar_period.proto deleted file mode 100644 index 82f5690b..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/calendar_period.proto +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod"; -option java_multiple_files = true; -option java_outer_classname = "CalendarPeriodProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// A `CalendarPeriod` represents the abstract concept of a time period that has -// a canonical start. Grammatically, "the start of the current -// `CalendarPeriod`." All calendar times begin at midnight UTC. -enum CalendarPeriod { - // Undefined period, raises an error. - CALENDAR_PERIOD_UNSPECIFIED = 0; - - // A day. - DAY = 1; - - // A week. Weeks begin on Monday, following - // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). - WEEK = 2; - - // A fortnight. The first calendar fortnight of the year begins at the start - // of week 1 according to - // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). - FORTNIGHT = 3; - - // A month. - MONTH = 4; - - // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each - // year. - QUARTER = 5; - - // A half-year. Half-years start on dates 1-Jan and 1-Jul. - HALF = 6; - - // A year. - YEAR = 7; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/code.proto b/proto-google-common-protos/src/main/proto/google/api/code.proto deleted file mode 100644 index 98ae0ac1..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/code.proto +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -option go_package = "google.golang.org/genproto/googleapis/rpc/code;code"; -option java_multiple_files = true; -option java_outer_classname = "CodeProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The canonical error codes for gRPC APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -enum Code { - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK = 0; - - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED = 1; - - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2; - - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3; - - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4; - - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND = 5; - - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6; - - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7; - - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16; - - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8; - - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9; - - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED = 10; - - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11; - - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12; - - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL = 13; - - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. Note that it is not always safe to retry - // non-idempotent operations. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14; - - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/color.proto b/proto-google-common-protos/src/main/proto/google/api/color.proto deleted file mode 100644 index 5dc85a6a..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/color.proto +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -import "google/protobuf/wrappers.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/color;color"; -option java_multiple_files = true; -option java_outer_classname = "ColorProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a color in the RGBA color space. This representation is designed -// for simplicity of conversion to/from color representations in various -// languages over compactness. For example, the fields of this representation -// can be trivially provided to the constructor of `java.awt.Color` in Java; it -// can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` -// method in iOS; and, with just a little work, it can be easily formatted into -// a CSS `rgba()` string in JavaScript. -// -// This reference page doesn't carry information about the absolute color -// space -// that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, -// DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color -// space. -// -// When color equality needs to be decided, implementations, unless -// documented otherwise, treat two colors as equal if all their red, -// green, blue, and alpha values each differ by at most 1e-5. -// -// Example (Java): -// -// import com.google.type.Color; -// -// // ... -// public static java.awt.Color fromProto(Color protocolor) { -// float alpha = protocolor.hasAlpha() -// ? protocolor.getAlpha().getValue() -// : 1.0; -// -// return new java.awt.Color( -// protocolor.getRed(), -// protocolor.getGreen(), -// protocolor.getBlue(), -// alpha); -// } -// -// public static Color toProto(java.awt.Color color) { -// float red = (float) color.getRed(); -// float green = (float) color.getGreen(); -// float blue = (float) color.getBlue(); -// float denominator = 255.0; -// Color.Builder resultBuilder = -// Color -// .newBuilder() -// .setRed(red / denominator) -// .setGreen(green / denominator) -// .setBlue(blue / denominator); -// int alpha = color.getAlpha(); -// if (alpha != 255) { -// result.setAlpha( -// FloatValue -// .newBuilder() -// .setValue(((float) alpha) / denominator) -// .build()); -// } -// return resultBuilder.build(); -// } -// // ... -// -// Example (iOS / Obj-C): -// -// // ... -// static UIColor* fromProto(Color* protocolor) { -// float red = [protocolor red]; -// float green = [protocolor green]; -// float blue = [protocolor blue]; -// FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; -// if (alpha_wrapper != nil) { -// alpha = [alpha_wrapper value]; -// } -// return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; -// } -// -// static Color* toProto(UIColor* color) { -// CGFloat red, green, blue, alpha; -// if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { -// return nil; -// } -// Color* result = [[Color alloc] init]; -// [result setRed:red]; -// [result setGreen:green]; -// [result setBlue:blue]; -// if (alpha <= 0.9999) { -// [result setAlpha:floatWrapperWithValue(alpha)]; -// } -// [result autorelease]; -// return result; -// } -// // ... -// -// Example (JavaScript): -// -// // ... -// -// var protoToCssColor = function(rgb_color) { -// var redFrac = rgb_color.red || 0.0; -// var greenFrac = rgb_color.green || 0.0; -// var blueFrac = rgb_color.blue || 0.0; -// var red = Math.floor(redFrac * 255); -// var green = Math.floor(greenFrac * 255); -// var blue = Math.floor(blueFrac * 255); -// -// if (!('alpha' in rgb_color)) { -// return rgbToCssColor(red, green, blue); -// } -// -// var alphaFrac = rgb_color.alpha.value || 0.0; -// var rgbParams = [red, green, blue].join(','); -// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); -// }; -// -// var rgbToCssColor = function(red, green, blue) { -// var rgbNumber = new Number((red << 16) | (green << 8) | blue); -// var hexString = rgbNumber.toString(16); -// var missingZeros = 6 - hexString.length; -// var resultBuilder = ['#']; -// for (var i = 0; i < missingZeros; i++) { -// resultBuilder.push('0'); -// } -// resultBuilder.push(hexString); -// return resultBuilder.join(''); -// }; -// -// // ... -message Color { - // The amount of red in the color as a value in the interval [0, 1]. - float red = 1; - - // The amount of green in the color as a value in the interval [0, 1]. - float green = 2; - - // The amount of blue in the color as a value in the interval [0, 1]. - float blue = 3; - - // The fraction of this color that should be applied to the pixel. That is, - // the final pixel color is defined by the equation: - // - // `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` - // - // This means that a value of 1.0 corresponds to a solid color, whereas - // a value of 0.0 corresponds to a completely transparent color. This - // uses a wrapper message rather than a simple float scalar so that it is - // possible to distinguish between a default value and the value being unset. - // If omitted, this color object is rendered as a solid color - // (as if the alpha value had been explicitly given a value of 1.0). - google.protobuf.FloatValue alpha = 4; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/date.proto b/proto-google-common-protos/src/main/proto/google/api/date.proto deleted file mode 100644 index e4e730e6..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/date.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/date;date"; -option java_multiple_files = true; -option java_outer_classname = "DateProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a whole or partial calendar date, such as a birthday. The time of -// day and time zone are either specified elsewhere or are insignificant. The -// date is relative to the Gregorian Calendar. This can represent one of the -// following: -// -// * A full date, with non-zero year, month, and day values -// * A month and day value, with a zero year, such as an anniversary -// * A year on its own, with zero month and day values -// * A year and month value, with a zero day, such as a credit card expiration -// date -// -// Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and -// `google.protobuf.Timestamp`. -message Date { - // Year of the date. Must be from 1 to 9999, or 0 to specify a date without - // a year. - int32 year = 1; - - // Month of a year. Must be from 1 to 12, or 0 to specify a year without a - // month and day. - int32 month = 2; - - // Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - // to specify a year by itself or a year and month where the day isn't - // significant. - int32 day = 3; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/datetime.proto b/proto-google-common-protos/src/main/proto/google/api/datetime.proto deleted file mode 100644 index cfed85d7..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/datetime.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -import "google/protobuf/duration.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime"; -option java_multiple_files = true; -option java_outer_classname = "DateTimeProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents civil time (or occasionally physical time). -// -// This type can represent a civil time in one of a few possible ways: -// -// * When utc_offset is set and time_zone is unset: a civil time on a calendar -// day with a particular offset from UTC. -// * When time_zone is set and utc_offset is unset: a civil time on a calendar -// day in a particular time zone. -// * When neither time_zone nor utc_offset is set: a civil time on a calendar -// day in local time. -// -// The date is relative to the Proleptic Gregorian Calendar. -// -// If year is 0, the DateTime is considered not to have a specific year. month -// and day must have valid, non-zero values. -// -// This type may also be used to represent a physical time if all the date and -// time fields are set and either case of the `time_offset` oneof is set. -// Consider using `Timestamp` message for physical time instead. If your use -// case also would like to store the user's timezone, that can be done in -// another field. -// -// This type is more flexible than some applications may want. Make sure to -// document and validate your application's limitations. -message DateTime { - // Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - // datetime without a year. - int32 year = 1; - - // Required. Month of year. Must be from 1 to 12. - int32 month = 2; - - // Required. Day of month. Must be from 1 to 31 and valid for the year and - // month. - int32 day = 3; - - // Required. Hours of day in 24 hour format. Should be from 0 to 23. An API - // may choose to allow the value "24:00:00" for scenarios like business - // closing time. - int32 hours = 4; - - // Required. Minutes of hour of day. Must be from 0 to 59. - int32 minutes = 5; - - // Required. Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. - int32 seconds = 6; - - // Required. Fractions of seconds in nanoseconds. Must be from 0 to - // 999,999,999. - int32 nanos = 7; - - // Optional. Specifies either the UTC offset or the time zone of the DateTime. - // Choose carefully between them, considering that time zone data may change - // in the future (for example, a country modifies their DST start/end dates, - // and future DateTimes in the affected range had already been stored). - // If omitted, the DateTime is considered to be in local time. - oneof time_offset { - // UTC offset. Must be whole seconds, between -18 hours and +18 hours. - // For example, a UTC offset of -4:00 would be represented as - // { seconds: -14400 }. - google.protobuf.Duration utc_offset = 8; - - // Time zone. - TimeZone time_zone = 9; - } -} - -// Represents a time zone from the -// [IANA Time Zone Database](https://www.iana.org/time-zones). -message TimeZone { - // IANA Time Zone Database time zone, e.g. "America/New_York". - string id = 1; - - // Optional. IANA Time Zone Database version number, e.g. "2019a". - string version = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/dayofweek.proto b/proto-google-common-protos/src/main/proto/google/api/dayofweek.proto deleted file mode 100644 index 4c80c62e..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/dayofweek.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option go_package = "google.golang.org/genproto/googleapis/type/dayofweek;dayofweek"; -option java_multiple_files = true; -option java_outer_classname = "DayOfWeekProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a day of the week. -enum DayOfWeek { - // The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0; - - // Monday - MONDAY = 1; - - // Tuesday - TUESDAY = 2; - - // Wednesday - WEDNESDAY = 3; - - // Thursday - THURSDAY = 4; - - // Friday - FRIDAY = 5; - - // Saturday - SATURDAY = 6; - - // Sunday - SUNDAY = 7; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/decimal.proto b/proto-google-common-protos/src/main/proto/google/api/decimal.proto deleted file mode 100644 index beb18a5d..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/decimal.proto +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/decimal;decimal"; -option java_multiple_files = true; -option java_outer_classname = "DecimalProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// A representation of a decimal value, such as 2.5. Clients may convert values -// into language-native decimal formats, such as Java's [BigDecimal][] or -// Python's [decimal.Decimal][]. -// -// [BigDecimal]: -// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html -// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html -message Decimal { - // The decimal value, as a string. - // - // The string representation consists of an optional sign, `+` (`U+002B`) - // or `-` (`U+002D`), followed by a sequence of zero or more decimal digits - // ("the integer"), optionally followed by a fraction, optionally followed - // by an exponent. - // - // The fraction consists of a decimal point followed by zero or more decimal - // digits. The string must contain at least one digit in either the integer - // or the fraction. The number formed by the sign, the integer and the - // fraction is referred to as the significand. - // - // The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) - // followed by one or more decimal digits. - // - // Services **should** normalize decimal values before storing them by: - // - // - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - // - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - // - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - // - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). - // - // Services **may** perform additional normalization based on its own needs - // and the internal decimal implementation selected, such as shifting the - // decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). - // Additionally, services **may** preserve trailing zeroes in the fraction - // to indicate increased precision, but are not required to do so. - // - // Note that only the `.` character is supported to divide the integer - // and the fraction; `,` **should not** be supported regardless of locale. - // Additionally, thousand separators **should not** be supported. If a - // service does support them, values **must** be normalized. - // - // The ENBF grammar is: - // - // DecimalString = - // [Sign] Significand [Exponent]; - // - // Sign = '+' | '-'; - // - // Significand = - // Digits ['.'] [Digits] | [Digits] '.' Digits; - // - // Exponent = ('e' | 'E') [Sign] Digits; - // - // Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; - // - // Services **should** clearly document the range of supported values, the - // maximum supported precision (total number of digits), and, if applicable, - // the scale (number of digits after the decimal point), as well as how it - // behaves when receiving out-of-bounds values. - // - // Services **may** choose to accept values passed as input even when the - // value has a higher precision or scale than the service supports, and - // **should** round the value to fit the supported scale. Alternatively, the - // service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) - // if precision would be lost. - // - // Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in - // gRPC) if the service receives a value outside of the supported range. - string value = 1; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/error_details.proto b/proto-google-common-protos/src/main/proto/google/api/error_details.proto deleted file mode 100644 index c4d6c4b7..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/error_details.proto +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/duration.proto"; - -option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails"; -option java_multiple_files = true; -option java_outer_classname = "ErrorDetailsProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retries have been reached or a maximum retry delay cap has been -// reached. -message RetryInfo { - // Clients should wait at least this long between retrying the same request. - google.protobuf.Duration retry_delay = 1; -} - -// Describes additional debugging info. -message DebugInfo { - // The stack trace entries indicating where the error occurred. - repeated string stack_entries = 1; - - // Additional debugging information provided by the server. - string detail = 2; -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryInfo and Help types for other details about handling a -// quota failure. -message QuotaFailure { - // A message type used to describe a single quota violation. For example, a - // daily quota or a custom quota that was exceeded. - message Violation { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - string subject = 1; - - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - string description = 2; - } - - // Describes all quota violations. - repeated Violation violations = 1; -} - -// Describes the cause of the error with structured details. -// -// Example of an error when contacting the "pubsub.googleapis.com" API when it -// is not enabled: -// -// { "reason": "API_DISABLED" -// "domain": "googleapis.com" -// "metadata": { -// "resource": "projects/123", -// "service": "pubsub.googleapis.com" -// } -// } -// -// This response indicates that the pubsub.googleapis.com API is not enabled. -// -// Example of an error that is returned when attempting to create a Spanner -// instance in a region that is out of stock: -// -// { "reason": "STOCKOUT" -// "domain": "spanner.googleapis.com", -// "metadata": { -// "availableRegions": "us-central1,us-east2" -// } -// } -message ErrorInfo { - // The reason of the error. This is a constant value that identifies the - // proximate cause of the error. Error reasons are unique within a particular - // domain of errors. This should be at most 63 characters and match - // /[A-Z0-9_]+/. - string reason = 1; - - // The logical grouping to which the "reason" belongs. The error domain - // is typically the registered service name of the tool or product that - // generates the error. Example: "pubsub.googleapis.com". If the error is - // generated by some common infrastructure, the error domain must be a - // globally unique value that identifies the infrastructure. For Google API - // infrastructure, the error domain is "googleapis.com". - string domain = 2; - - // Additional structured details about this error. - // - // Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in - // length. When identifying the current value of an exceeded limit, the units - // should be contained in the key, not the value. For example, rather than - // {"instanceLimit": "100/request"}, should be returned as, - // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of - // instances that can be created in a single (batch) request. - map metadata = 3; -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -message PreconditionFailure { - // A message type used to describe a single precondition failure. - message Violation { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation subjects. For - // example, "TOS" for "Terms of Service violation". - string type = 1; - - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would indicate - // which terms of service is being referenced. - string subject = 2; - - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - string description = 3; - } - - // Describes all precondition violations. - repeated Violation violations = 1; -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -message BadRequest { - // A message type used to describe a single bad request field. - message FieldViolation { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - string field = 1; - - // A description of why the request element is bad. - string description = 2; - } - - // Describes all violations in a client request. - repeated FieldViolation field_violations = 1; -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -message RequestInfo { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - string request_id = 1; - - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - string serving_data = 2; -} - -// Describes the resource that is being accessed. -message ResourceInfo { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - string resource_type = 1; - - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - string resource_name = 2; - - // The owner of the resource (optional). - // For example, "user:" or "project:". - string owner = 3; - - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - string description = 4; -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -message Help { - // Describes a URL link. - message Link { - // Describes what the link offers. - string description = 1; - - // The URL of the link. - string url = 2; - } - - // URL(s) pointing to additional information on handling the current error. - repeated Link links = 1; -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -message LocalizedMessage { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - string locale = 1; - - // The localized error message in the above locale. - string message = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/expr.proto b/proto-google-common-protos/src/main/proto/google/api/expr.proto deleted file mode 100644 index af0778cf..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/expr.proto +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option go_package = "google.golang.org/genproto/googleapis/type/expr;expr"; -option java_multiple_files = true; -option java_outer_classname = "ExprProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a textual expression in the Common Expression Language (CEL) -// syntax. CEL is a C-like expression language. The syntax and semantics of CEL -// are documented at https://github.com/google/cel-spec. -// -// Example (Comparison): -// -// title: "Summary size limit" -// description: "Determines if a summary is less than 100 chars" -// expression: "document.summary.size() < 100" -// -// Example (Equality): -// -// title: "Requestor is owner" -// description: "Determines if requestor is the document owner" -// expression: "document.owner == request.auth.claims.email" -// -// Example (Logic): -// -// title: "Public documents" -// description: "Determine whether the document should be publicly visible" -// expression: "document.type != 'private' && document.type != 'internal'" -// -// Example (Data Manipulation): -// -// title: "Notification string" -// description: "Create a notification string with a timestamp." -// expression: "'New message received at ' + string(document.create_time)" -// -// The exact variables and functions that may be referenced within an expression -// are determined by the service that evaluates it. See the service -// documentation for additional information. -message Expr { - // Textual representation of an expression in Common Expression Language - // syntax. - string expression = 1; - - // Optional. Title for the expression, i.e. a short string describing - // its purpose. This can be used e.g. in UIs which allow to enter the - // expression. - string title = 2; - - // Optional. Description of the expression. This is a longer text which - // describes the expression, e.g. when hovered over it in a UI. - string description = 3; - - // Optional. String indicating the location of the expression for error - // reporting, e.g. a file name and a position in the file. - string location = 4; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/fraction.proto b/proto-google-common-protos/src/main/proto/google/api/fraction.proto deleted file mode 100644 index 6c5ae6e2..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/fraction.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option go_package = "google.golang.org/genproto/googleapis/type/fraction;fraction"; -option java_multiple_files = true; -option java_outer_classname = "FractionProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a fraction in terms of a numerator divided by a denominator. -message Fraction { - // The numerator in the fraction, e.g. 2 in 2/3. - int64 numerator = 1; - - // The value by which the numerator is divided, e.g. 3 in 2/3. Must be - // positive. - int64 denominator = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/http_request.proto b/proto-google-common-protos/src/main/proto/google/api/http_request.proto deleted file mode 100644 index d34fe7be..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/http_request.proto +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.type; - -import "google/protobuf/duration.proto"; -import "google/api/annotations.proto"; - -option csharp_namespace = "Google.Cloud.Logging.Type"; -option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; -option java_multiple_files = true; -option java_outer_classname = "HttpRequestProto"; -option java_package = "com.google.logging.type"; -option php_namespace = "Google\\Cloud\\Logging\\Type"; -option ruby_package = "Google::Cloud::Logging::Type"; - -// A common proto for logging HTTP requests. Only contains semantics -// defined by the HTTP specification. Product-specific logging -// information MUST be defined in a separate message. -message HttpRequest { - // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - string request_method = 1; - - // The scheme (http, https), the host name, the path and the query - // portion of the URL that was requested. - // Example: `"http://example.com/some/info?color=red"`. - string request_url = 2; - - // The size of the HTTP request message in bytes, including the request - // headers and the request body. - int64 request_size = 3; - - // The response code indicating the status of response. - // Examples: 200, 404. - int32 status = 4; - - // The size of the HTTP response message sent back to the client, in bytes, - // including the response headers and the response body. - int64 response_size = 5; - - // The user agent sent by the client. Example: - // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET - // CLR 1.0.3705)"`. - string user_agent = 6; - - // The IP address (IPv4 or IPv6) of the client that issued the HTTP - // request. This field can include port information. Examples: - // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. - string remote_ip = 7; - - // The IP address (IPv4 or IPv6) of the origin server that the request was - // sent to. This field can include port information. Examples: - // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`. - string server_ip = 13; - - // The referer URL of the request, as defined in - // [HTTP/1.1 Header Field - // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - string referer = 8; - - // The request processing latency on the server, from the time the request was - // received until the response was sent. - google.protobuf.Duration latency = 14; - - // Whether or not a cache lookup was attempted. - bool cache_lookup = 11; - - // Whether or not an entity was served from cache - // (with or without validation). - bool cache_hit = 9; - - // Whether or not the response was validated with the origin server before - // being served from cache. This field is only meaningful if `cache_hit` is - // True. - bool cache_validated_with_origin_server = 10; - - // The number of HTTP response bytes inserted into cache. Set only when a - // cache fill was attempted. - int64 cache_fill_bytes = 12; - - // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - string protocol = 15; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/interval.proto b/proto-google-common-protos/src/main/proto/google/api/interval.proto deleted file mode 100644 index 9702324c..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/interval.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/interval;interval"; -option java_multiple_files = true; -option java_outer_classname = "IntervalProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a time interval, encoded as a Timestamp start (inclusive) and a -// Timestamp end (exclusive). -// -// The start must be less than or equal to the end. -// When the start equals the end, the interval is empty (matches no time). -// When both start and end are unspecified, the interval matches any time. -message Interval { - // Optional. Inclusive start of the interval. - // - // If specified, a Timestamp matching this interval will have to be the same - // or after the start. - google.protobuf.Timestamp start_time = 1; - - // Optional. Exclusive end of the interval. - // - // If specified, a Timestamp matching this interval will have to be before the - // end. - google.protobuf.Timestamp end_time = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/latlng.proto b/proto-google-common-protos/src/main/proto/google/api/latlng.proto deleted file mode 100644 index 9231456e..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/latlng.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng"; -option java_multiple_files = true; -option java_outer_classname = "LatLngProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// An object that represents a latitude/longitude pair. This is expressed as a -// pair of doubles to represent degrees latitude and degrees longitude. Unless -// specified otherwise, this must conform to the -// WGS84 -// standard. Values must be within normalized ranges. -message LatLng { - // The latitude in degrees. It must be in the range [-90.0, +90.0]. - double latitude = 1; - - // The longitude in degrees. It must be in the range [-180.0, +180.0]. - double longitude = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/localized_text.proto b/proto-google-common-protos/src/main/proto/google/api/localized_text.proto deleted file mode 100644 index 5c6922b8..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/localized_text.proto +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/localized_text;localized_text"; -option java_multiple_files = true; -option java_outer_classname = "LocalizedTextProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Localized variant of a text in a particular language. -message LocalizedText { - // Localized string in the language corresponding to `language_code' below. - string text = 1; - - // The text's BCP-47 language code, such as "en-US" or "sr-Latn". - // - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/log_severity.proto b/proto-google-common-protos/src/main/proto/google/api/log_severity.proto deleted file mode 100644 index 0762b5c9..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/log_severity.proto +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.type; - -import "google/api/annotations.proto"; - -option csharp_namespace = "Google.Cloud.Logging.Type"; -option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype"; -option java_multiple_files = true; -option java_outer_classname = "LogSeverityProto"; -option java_package = "com.google.logging.type"; -option php_namespace = "Google\\Cloud\\Logging\\Type"; -option ruby_package = "Google::Cloud::Logging::Type"; - -// The severity of the event described in a log entry, expressed as one of the -// standard severity levels listed below. For your reference, the levels are -// assigned the listed numeric values. The effect of using numeric values other -// than those listed is undefined. -// -// You can filter for log entries by severity. For example, the following -// filter expression will match log entries with severities `INFO`, `NOTICE`, -// and `WARNING`: -// -// severity > DEBUG AND severity <= WARNING -// -// If you are writing log entries, you should map other severity encodings to -// one of these standard levels. For example, you might map all of Java's FINE, -// FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the -// original severity level in the log entry payload if you wish. -enum LogSeverity { - // (0) The log entry has no assigned severity level. - DEFAULT = 0; - - // (100) Debug or trace information. - DEBUG = 100; - - // (200) Routine information, such as ongoing status or performance. - INFO = 200; - - // (300) Normal but significant events, such as start up, shut down, or - // a configuration change. - NOTICE = 300; - - // (400) Warning events might cause problems. - WARNING = 400; - - // (500) Error events are likely to cause problems. - ERROR = 500; - - // (600) Critical events cause more severe problems or outages. - CRITICAL = 600; - - // (700) A person must take an action immediately. - ALERT = 700; - - // (800) One or more systems are unusable. - EMERGENCY = 800; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/money.proto b/proto-google-common-protos/src/main/proto/google/api/money.proto deleted file mode 100644 index 98d6494e..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/money.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/money;money"; -option java_multiple_files = true; -option java_outer_classname = "MoneyProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents an amount of money with its currency type. -message Money { - // The three-letter currency code defined in ISO 4217. - string currency_code = 1; - - // The whole units of the amount. - // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - int64 units = 2; - - // Number of nano (10^-9) units of the amount. - // The value must be between -999,999,999 and +999,999,999 inclusive. - // If `units` is positive, `nanos` must be positive or zero. - // If `units` is zero, `nanos` can be positive, zero, or negative. - // If `units` is negative, `nanos` must be negative or zero. - // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - int32 nanos = 3; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/month.proto b/proto-google-common-protos/src/main/proto/google/api/month.proto deleted file mode 100644 index 99e7551b..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/month.proto +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option go_package = "google.golang.org/genproto/googleapis/type/month;month"; -option java_multiple_files = true; -option java_outer_classname = "MonthProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a month in the Gregorian calendar. -enum Month { - // The unspecified month. - MONTH_UNSPECIFIED = 0; - - // The month of January. - JANUARY = 1; - - // The month of February. - FEBRUARY = 2; - - // The month of March. - MARCH = 3; - - // The month of April. - APRIL = 4; - - // The month of May. - MAY = 5; - - // The month of June. - JUNE = 6; - - // The month of July. - JULY = 7; - - // The month of August. - AUGUST = 8; - - // The month of September. - SEPTEMBER = 9; - - // The month of October. - OCTOBER = 10; - - // The month of November. - NOVEMBER = 11; - - // The month of December. - DECEMBER = 12; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/operations.proto b/proto-google-common-protos/src/main/proto/google/api/operations.proto deleted file mode 100644 index c1fdc6f5..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/operations.proto +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.longrunning; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/rpc/status.proto"; -import "google/protobuf/descriptor.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.LongRunning"; -option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.longrunning"; -option php_namespace = "Google\\LongRunning"; - -extend google.protobuf.MethodOptions { - // Additional information regarding long-running operations. - // In particular, this specifies the types that are returned from - // long-running operations. - // - // Required for methods that return `google.longrunning.Operation`; invalid - // otherwise. - google.longrunning.OperationInfo operation_info = 1049; -} - -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return [Operation][google.longrunning.Operation] to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or pass the operation resource to another API (such as -// Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the `Operations` interface -// so developers can have a consistent client experience. -service Operations { - option (google.api.default_host) = "longrunning.googleapis.com"; - - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - // - // NOTE: the `name` binding allows API services to override the binding - // to use different resource name schemes, such as `users/*/operations`. To - // override the binding, API services can add a binding such as - // `"/v1/{name=users/*}/operations"` to their service configuration. - // For backwards compatibility, the default name includes the operations - // collection id, however overriding users must ensure the name binding - // is the parent resource, without the operations collection id. - rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { - get: "/v1/{name=operations}" - }; - option (google.api.method_signature) = "name,filter"; - } - - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { - get: "/v1/{name=operations/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=operations/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=operations/**}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - rpc WaitOperation(WaitOperationRequest) returns (Operation) { - } -} - -// This resource represents a long-running operation that is the result of a -// network API call. -message Operation { - // The server-assigned name, which is only unique within the same service that - // originally returns it. If you use the default HTTP mapping, the - // `name` should be a resource name ending with `operations/{unique_id}`. - string name = 1; - - // Service-specific metadata associated with the operation. It typically - // contains progress information and common metadata such as create time. - // Some services might not provide such metadata. Any method that returns a - // long-running operation should document the metadata type, if any. - google.protobuf.Any metadata = 2; - - // If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - bool done = 3; - - // The operation result, which can be either an `error` or a valid `response`. - // If `done` == `false`, neither `error` nor `response` is set. - // If `done` == `true`, exactly one of `error` or `response` is set. - oneof result { - // The error result of the operation in case of failure or cancellation. - google.rpc.Status error = 4; - - // The normal response of the operation in case of success. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` - // is the original method name. For example, if the original method name - // is `TakeSnapshot()`, the inferred response type is - // `TakeSnapshotResponse`. - google.protobuf.Any response = 5; - } -} - -// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. -message GetOperationRequest { - // The name of the operation resource. - string name = 1; -} - -// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsRequest { - // The name of the operation's parent resource. - string name = 4; - - // The standard list filter. - string filter = 1; - - // The standard list page size. - int32 page_size = 2; - - // The standard list page token. - string page_token = 3; -} - -// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsResponse { - // A list of operations that matches the specified filter in the request. - repeated Operation operations = 1; - - // The standard List next-page token. - string next_page_token = 2; -} - -// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. -message CancelOperationRequest { - // The name of the operation resource to be cancelled. - string name = 1; -} - -// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. -message DeleteOperationRequest { - // The name of the operation resource to be deleted. - string name = 1; -} - -// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. -message WaitOperationRequest { - // The name of the operation resource to wait on. - string name = 1; - - // The maximum duration to wait before timing out. If left blank, the wait - // will be at most the time permitted by the underlying HTTP/RPC protocol. - // If RPC context deadline is also specified, the shorter one will be used. - google.protobuf.Duration timeout = 2; -} - -// A message representing the message types used by a long-running operation. -// -// Example: -// -// rpc LongRunningRecognize(LongRunningRecognizeRequest) -// returns (google.longrunning.Operation) { -// option (google.longrunning.operation_info) = { -// response_type: "LongRunningRecognizeResponse" -// metadata_type: "LongRunningRecognizeMetadata" -// }; -// } -message OperationInfo { - // Required. The message name of the primary return type for this - // long-running operation. - // This type will be used to deserialize the LRO's response. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - string response_type = 1; - - // Required. The message name of the metadata type for this long-running - // operation. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - string metadata_type = 2; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/phone_number.proto b/proto-google-common-protos/src/main/proto/google/api/phone_number.proto deleted file mode 100644 index 7bbb7d87..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/phone_number.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/phone_number;phone_number"; -option java_multiple_files = true; -option java_outer_classname = "PhoneNumberProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// An object representing a phone number, suitable as an API wire format. -// -// This representation: -// -// - should not be used for locale-specific formatting of a phone number, such -// as "+1 (650) 253-0000 ext. 123" -// -// - is not designed for efficient storage -// - may not be suitable for dialing - specialized libraries (see references) -// should be used to parse the number for that purpose -// -// To do something meaningful with this number, such as format it for various -// use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first. -// -// For instance, in Java this would be: -// -// com.google.type.PhoneNumber wireProto = -// com.google.type.PhoneNumber.newBuilder().build(); -// com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = -// PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ"); -// if (!wireProto.getExtension().isEmpty()) { -// phoneNumber.setExtension(wireProto.getExtension()); -// } -// -// Reference(s): -// - https://github.com/google/libphonenumber -message PhoneNumber { - // An object representing a short code, which is a phone number that is - // typically much shorter than regular phone numbers and can be used to - // address messages in MMS and SMS systems, as well as for abbreviated dialing - // (e.g. "Text 611 to see how many minutes you have remaining on your plan."). - // - // Short codes are restricted to a region and are not internationally - // dialable, which means the same short code can exist in different regions, - // with different usage and pricing, even if those regions share the same - // country calling code (e.g. US and CA). - message ShortCode { - // Required. The BCP-47 region code of the location where calls to this - // short code can be made, such as "US" and "BB". - // - // Reference(s): - // - http://www.unicode.org/reports/tr35/#unicode_region_subtag - string region_code = 1; - - // Required. The short code digits, without a leading plus ('+') or country - // calling code, e.g. "611". - string number = 2; - } - - // Required. Either a regular number, or a short code. New fields may be - // added to the oneof below in the future, so clients should ignore phone - // numbers for which none of the fields they coded against are set. - oneof kind { - // The phone number, represented as a leading plus sign ('+'), followed by a - // phone number that uses a relaxed ITU E.164 format consisting of the - // country calling code (1 to 3 digits) and the subscriber number, with no - // additional spaces or formatting, e.g.: - // - correct: "+15552220123" - // - incorrect: "+1 (555) 222-01234 x123". - // - // The ITU E.164 format limits the latter to 12 digits, but in practice not - // all countries respect that, so we relax that restriction here. - // National-only numbers are not allowed. - // - // References: - // - https://www.itu.int/rec/T-REC-E.164-201011-I - // - https://en.wikipedia.org/wiki/E.164. - // - https://en.wikipedia.org/wiki/List_of_country_calling_codes - string e164_number = 1; - - // A short code. - // - // Reference(s): - // - https://en.wikipedia.org/wiki/Short_code - ShortCode short_code = 2; - } - - // The phone number's extension. The extension is not standardized in ITU - // recommendations, except for being defined as a series of numbers with a - // maximum length of 40 digits. Other than digits, some other dialing - // characters such as ',' (indicating a wait) or '#' may be stored here. - // - // Note that no regions currently use extensions with short codes, so this - // field is normally only set in conjunction with an E.164 number. It is held - // separately from the E.164 number to allow for short code extensions in the - // future. - string extension = 3; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/postal_address.proto b/proto-google-common-protos/src/main/proto/google/api/postal_address.proto deleted file mode 100644 index c57c7c31..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/postal_address.proto +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress"; -option java_multiple_files = true; -option java_outer_classname = "PostalAddressProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a postal address, e.g. for postal delivery or payments addresses. -// Given a postal address, a postal service can deliver items to a premise, P.O. -// Box or similar. -// It is not intended to model geographical locations (roads, towns, -// mountains). -// -// In typical usage an address would be created via user input or from importing -// existing data, depending on the type of process. -// -// Advice on address input / editing: -// - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) -// - Users should not be presented with UI elements for input or editing of -// fields outside countries where that field is used. -// -// For more guidance on how to use this schema, please see: -// https://support.google.com/business/answer/6397478 -message PostalAddress { - // The schema revision of the `PostalAddress`. This must be set to 0, which is - // the latest revision. - // - // All new revisions **must** be backward compatible with old revisions. - int32 revision = 1; - - // Required. CLDR region code of the country/region of the address. This - // is never inferred and it is up to the user to ensure the value is - // correct. See http://cldr.unicode.org/ and - // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html - // for details. Example: "CH" for Switzerland. - string region_code = 2; - - // Optional. BCP-47 language code of the contents of this address (if - // known). This is often the UI language of the input form or is expected - // to match one of the languages used in the address' country/region, or their - // transliterated equivalents. - // This can affect formatting in certain countries, but is not critical - // to the correctness of the data and will never affect any validation or - // other non-formatting related operations. - // - // If this value is not known, it should be omitted (rather than specifying a - // possibly incorrect default). - // - // Examples: "zh-Hant", "ja", "ja-Latn", "en". - string language_code = 3; - - // Optional. Postal code of the address. Not all countries use or require - // postal codes to be present, but where they are used, they may trigger - // additional validation with other parts of the address (e.g. state/zip - // validation in the U.S.A.). - string postal_code = 4; - - // Optional. Additional, country-specific, sorting code. This is not used - // in most regions. Where it is used, the value is either a string like - // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number - // alone, representing the "sector code" (Jamaica), "delivery area indicator" - // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). - string sorting_code = 5; - - // Optional. Highest administrative subdivision which is used for postal - // addresses of a country or region. - // For example, this can be a state, a province, an oblast, or a prefecture. - // Specifically, for Spain this is the province and not the autonomous - // community (e.g. "Barcelona" and not "Catalonia"). - // Many countries don't use an administrative area in postal addresses. E.g. - // in Switzerland this should be left unpopulated. - string administrative_area = 6; - - // Optional. Generally refers to the city/town portion of the address. - // Examples: US city, IT comune, UK post town. - // In regions of the world where localities are not well defined or do not fit - // into this structure well, leave locality empty and use address_lines. - string locality = 7; - - // Optional. Sublocality of the address. - // For example, this can be neighborhoods, boroughs, districts. - string sublocality = 8; - - // Unstructured address lines describing the lower levels of an address. - // - // Because values in address_lines do not have type information and may - // sometimes contain multiple values in a single field (e.g. - // "Austin, TX"), it is important that the line order is clear. The order of - // address lines should be "envelope order" for the country/region of the - // address. In places where this can vary (e.g. Japan), address_language is - // used to make it explicit (e.g. "ja" for large-to-small ordering and - // "ja-Latn" or "en" for small-to-large). This way, the most specific line of - // an address can be selected based on the language. - // - // The minimum permitted structural representation of an address consists - // of a region_code with all remaining information placed in the - // address_lines. It would be possible to format such an address very - // approximately without geocoding, but no semantic reasoning could be - // made about any of the address components until it was at least - // partially resolved. - // - // Creating an address only containing a region_code and address_lines, and - // then geocoding is the recommended way to handle completely unstructured - // addresses (as opposed to guessing which parts of the address should be - // localities or administrative areas). - repeated string address_lines = 9; - - // Optional. The recipient at the address. - // This field may, under certain circumstances, contain multiline information. - // For example, it might contain "care of" information. - repeated string recipients = 10; - - // Optional. The name of the organization at the address. - string organization = 11; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/quaternion.proto b/proto-google-common-protos/src/main/proto/google/api/quaternion.proto deleted file mode 100644 index dfb822de..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/quaternion.proto +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion"; -option java_multiple_files = true; -option java_outer_classname = "QuaternionProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// A quaternion is defined as the quotient of two directed lines in a -// three-dimensional space or equivalently as the quotient of two Euclidean -// vectors (https://en.wikipedia.org/wiki/Quaternion). -// -// Quaternions are often used in calculations involving three-dimensional -// rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation), -// as they provide greater mathematical robustness by avoiding the gimbal lock -// problems that can be encountered when using Euler angles -// (https://en.wikipedia.org/wiki/Gimbal_lock). -// -// Quaternions are generally represented in this form: -// -// w + xi + yj + zk -// -// where x, y, z, and w are real numbers, and i, j, and k are three imaginary -// numbers. -// -// Our naming choice `(x, y, z, w)` comes from the desire to avoid confusion for -// those interested in the geometric properties of the quaternion in the 3D -// Cartesian space. Other texts often use alternative names or subscripts, such -// as `(a, b, c, d)`, `(1, i, j, k)`, or `(0, 1, 2, 3)`, which are perhaps -// better suited for mathematical interpretations. -// -// To avoid any confusion, as well as to maintain compatibility with a large -// number of software libraries, the quaternions represented using the protocol -// buffer below *must* follow the Hamilton convention, which defines `ij = k` -// (i.e. a right-handed algebra), and therefore: -// -// i^2 = j^2 = k^2 = ijk = −1 -// ij = −ji = k -// jk = −kj = i -// ki = −ik = j -// -// Please DO NOT use this to represent quaternions that follow the JPL -// convention, or any of the other quaternion flavors out there. -// -// Definitions: -// -// - Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`. -// - Unit (or normalized) quaternion: a quaternion whose norm is 1. -// - Pure quaternion: a quaternion whose scalar component (`w`) is 0. -// - Rotation quaternion: a unit quaternion used to represent rotation. -// - Orientation quaternion: a unit quaternion used to represent orientation. -// -// A quaternion can be normalized by dividing it by its norm. The resulting -// quaternion maintains the same direction, but has a norm of 1, i.e. it moves -// on the unit sphere. This is generally necessary for rotation and orientation -// quaternions, to avoid rounding errors: -// https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions -// -// Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation, -// but normalization would be even more useful, e.g. for comparison purposes, if -// it would produce a unique representation. It is thus recommended that `w` be -// kept positive, which can be achieved by changing all the signs when `w` is -// negative. -// -message Quaternion { - // The x component. - double x = 1; - - // The y component. - double y = 2; - - // The z component. - double z = 3; - - // The scalar component. - double w = 4; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/status.proto b/proto-google-common-protos/src/main/proto/google/api/status.proto deleted file mode 100644 index 3b1f7a93..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/status.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). Each `Status` message contains -// three pieces of data: error code, error message, and error details. -// -// You can find out more about this error model and how to work with it in the -// [API Design Guide](https://cloud.google.com/apis/design/errors). -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/timeofday.proto b/proto-google-common-protos/src/main/proto/google/api/timeofday.proto deleted file mode 100644 index 5cb48aa9..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/timeofday.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/type/timeofday;timeofday"; -option java_multiple_files = true; -option java_outer_classname = "TimeOfDayProto"; -option java_package = "com.google.type"; -option objc_class_prefix = "GTP"; - -// Represents a time of day. The date and time zone are either not significant -// or are specified elsewhere. An API may choose to allow leap seconds. Related -// types are [google.type.Date][google.type.Date] and -// `google.protobuf.Timestamp`. -message TimeOfDay { - // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - // to allow the value "24:00:00" for scenarios like business closing time. - int32 hours = 1; - - // Minutes of hour of day. Must be from 0 to 59. - int32 minutes = 2; - - // Seconds of minutes of the time. Must normally be from 0 to 59. An API may - // allow the value 60 if it allows leap-seconds. - int32 seconds = 3; - - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - int32 nanos = 4; -} diff --git a/proto-google-common-protos/src/main/proto/google/api/viewport.proto b/proto-google-common-protos/src/main/proto/google/api/viewport.proto deleted file mode 100644 index ad5029f8..00000000 --- a/proto-google-common-protos/src/main/proto/google/api/viewport.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.geo.type; - -import "google/type/latlng.proto"; - -option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport"; -option java_multiple_files = true; -option java_outer_classname = "ViewportProto"; -option java_package = "com.google.geo.type"; -option objc_class_prefix = "GGTP"; - -// A latitude-longitude viewport, represented as two diagonally opposite `low` -// and `high` points. A viewport is considered a closed region, i.e. it includes -// its boundary. The latitude bounds must range between -90 to 90 degrees -// inclusive, and the longitude bounds must range between -180 to 180 degrees -// inclusive. Various cases include: -// -// - If `low` = `high`, the viewport consists of that single point. -// -// - If `low.longitude` > `high.longitude`, the longitude range is inverted -// (the viewport crosses the 180 degree longitude line). -// -// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, -// the viewport includes all longitudes. -// -// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, -// the longitude range is empty. -// -// - If `low.latitude` > `high.latitude`, the latitude range is empty. -// -// Both `low` and `high` must be populated, and the represented box cannot be -// empty (as specified by the definitions above). An empty viewport will result -// in an error. -// -// For example, this viewport fully encloses New York City: -// -// { -// "low": { -// "latitude": 40.477398, -// "longitude": -74.259087 -// }, -// "high": { -// "latitude": 40.91618, -// "longitude": -73.70018 -// } -// } -message Viewport { - // Required. The low point of the viewport. - google.type.LatLng low = 1; - - // Required. The high point of the viewport. - google.type.LatLng high = 2; -} diff --git a/synth.py b/synth.py index 037c91e0..c5c64dd6 100644 --- a/synth.py +++ b/synth.py @@ -64,7 +64,7 @@ def build_proto(target): java.fix_proto_headers(src_output) s.copy(src_output / "src/com", "proto-google-common-protos/src/main/java/com") proto_path = (target.split(":")[0])[2:] - s.copy(googleapis / proto_path / "*.proto", "proto-google-common-protos/src/main/proto/" + proto_path) + s.copy(googleapis / proto_path / f"*.proto", "proto-google-common-protos/src/main/proto/"+ proto_path ) def build_grpc(target): """Build a grpc build target and copy all generate source files."""