From ad679d12f46896e4fd69e45835d6f67e10c3da69 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:16:55 -0800 Subject: [PATCH 1/6] docs: [orchestration] add examples for kubernetes secret (#5869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add examples for kubernetes secret chore: explicitly set fields to field_behavior optional PiperOrigin-RevId: 703589766 Source-Link: https://github.com/googleapis/googleapis/commit/22dffa8f690606f58578f478e45172fbf7a06976 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3a83c894fc43e34d7dc94ffa94727d4d5365b410 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiIzYTgzYzg5NGZjNDNlMzRkN2RjOTRmZmE5NDcyN2Q0ZDUzNjViNDEwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../airflow/service/v1/environments.proto | 48 ++++++++++++------ .../protos/protos.json | 50 +++++++++++++++---- 2 files changed, 72 insertions(+), 26 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto index 9976999b6f0..d27cb6be08f 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -769,6 +769,13 @@ message UserWorkloadsSecret { // pairs, which can contain sensitive values such as a password, a token, or a // key. The values for all keys have to be base64-encoded strings. For details // see: https://kubernetes.io/docs/concepts/configuration/secret/ + // + // Example: + // + // { + // "example": "ZXhhbXBsZV92YWx1ZQ==", + // "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" + // } map data = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -798,6 +805,13 @@ message UserWorkloadsConfigMap { // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value // pairs. For details see: // https://kubernetes.io/docs/concepts/configuration/configmap/ + // + // Example: + // + // { + // "example_key": "example_value", + // "another_key": "another_value" + // } map data = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -1064,14 +1078,16 @@ message EnvironmentConfig { // composer-1.*.*-airflow-*.*.*. int32 node_count = 3; - // The configuration settings for software inside the environment. - SoftwareConfig software_config = 4; + // Optional. The configuration settings for software inside the environment. + SoftwareConfig software_config = 4 [(google.api.field_behavior) = OPTIONAL]; - // The configuration used for the Kubernetes Engine cluster. - NodeConfig node_config = 5; + // Optional. The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5 [(google.api.field_behavior) = OPTIONAL]; - // The configuration used for the Private IP Cloud Composer environment. - PrivateEnvironmentConfig private_environment_config = 7; + // Optional. The configuration used for the Private IP Cloud Composer + // environment. + PrivateEnvironmentConfig private_environment_config = 7 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The network-level access control policy for the Airflow web // server. If unspecified, no network-level access restrictions will be @@ -1274,7 +1290,7 @@ message SoftwareConfig { PLUGINS_ENABLED = 2; } - // The version of the software running in the environment. + // Optional. The version of the software running in the environment. // This encapsulates both the version of Cloud Composer functionality and the // version of Apache Airflow. It must match the regular expression // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. @@ -1298,7 +1314,7 @@ message SoftwareConfig { // See also [version // list](/composer/docs/concepts/versioning/composer-versions) and [versioning // overview](/composer/docs/concepts/versioning/composer-versioning-overview). - string image_version = 1; + string image_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Apache Airflow configuration properties to override. // @@ -1511,7 +1527,7 @@ message NodeConfig { // is provided, `nodeConfig.subnetwork` must also be provided. For // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see // `nodeConfig.subnetwork`. - string network = 3; + string network = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The Compute Engine subnetwork to be used for machine // communications, specified as a @@ -1522,7 +1538,7 @@ message NodeConfig { // If a subnetwork is provided, `nodeConfig.network` must also be provided, // and the subnetwork must belong to the enclosing environment's project and // location. - string subnetwork = 4; + string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. // If unspecified, defaults to 100GB. Cannot be updated. @@ -1542,7 +1558,7 @@ message NodeConfig { // Optional. The Google Cloud Platform Service Account to be used by the node // VMs. If a service account is not specified, the "default" Compute Engine // service account is used. Cannot be updated. - string service_account = 7; + string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The list of instance tags applied to all node VMs. Tags are used // to identify valid sources or targets for network firewalls. Each tag within @@ -1911,15 +1927,15 @@ message Environment { ERROR = 5; } - // The resource name of the environment, in the form: + // Identifier. The resource name of the environment, in the form: // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" // // EnvironmentId must start with a lowercase letter followed by up to 63 // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Configuration parameters for this environment. - EnvironmentConfig config = 2; + // Optional. Configuration parameters for this environment. + EnvironmentConfig config = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. The UUID (Universally Unique IDentifier) associated with this // environment. This value is generated when the environment is created. @@ -1942,7 +1958,7 @@ message Environment { // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} // * Both keys and values are additionally constrained to be <= 128 bytes in // size. - map labels = 7; + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; // Output only. Reserved for future use. bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index ea6ae9ce72a..bdd785cb436 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -1198,15 +1198,24 @@ }, "softwareConfig": { "type": "SoftwareConfig", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "nodeConfig": { "type": "NodeConfig", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "privateEnvironmentConfig": { "type": "PrivateEnvironmentConfig", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "webServerNetworkAccessControl": { "type": "WebServerNetworkAccessControl", @@ -1409,7 +1418,10 @@ "fields": { "imageVersion": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "airflowConfigOverrides": { "keyType": "string", @@ -1527,11 +1539,17 @@ }, "network": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "subnetwork": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "diskSizeGb": { "type": "int32", @@ -1544,7 +1562,10 @@ }, "serviceAccount": { "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "tags": { "rule": "repeated", @@ -1990,11 +2011,17 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, "config": { "type": "EnvironmentConfig", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "uuid": { "type": "string", @@ -2015,7 +2042,10 @@ "labels": { "keyType": "string", "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "satisfiesPzs": { "type": "bool", From 24d7341b387fc8f6d286ff945bc9aed54ddcc7df Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:17:10 -0800 Subject: [PATCH 2/6] feat: [routing] add API for experimental flyover and narrow road polyline details (#5865) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add API for experimental flyover and narrow road polyline details PiperOrigin-RevId: 703138506 Source-Link: https://github.com/googleapis/googleapis/commit/a3211f3342219aad1b310ec1739476586384473a Source-Link: https://github.com/googleapis/googleapis-gen/commit/7616de9c9b8e5e4abcdf25f9069ebe3e327f51eb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNzYxNmRlOWM5YjhlNWU0YWJjZGYyNWY5MDY5ZWJlM2UzMjdmNTFlYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../maps/routing/v2/polyline_details.proto | 84 + .../protos/google/maps/routing/v2/route.proto | 4 + .../maps/routing/v2/routes_service.proto | 14 + .../google-maps-routing/protos/protos.d.ts | 936 ++++++-- packages/google-maps-routing/protos/protos.js | 2118 +++++++++++++---- .../google-maps-routing/protos/protos.json | 181 +- .../src/v2/routes_proto_list.json | 1 + 7 files changed, 2532 insertions(+), 806 deletions(-) create mode 100644 packages/google-maps-routing/protos/google/maps/routing/v2/polyline_details.proto diff --git a/packages/google-maps-routing/protos/google/maps/routing/v2/polyline_details.proto b/packages/google-maps-routing/protos/google/maps/routing/v2/polyline_details.proto new file mode 100644 index 00000000000..7c3ec343a44 --- /dev/null +++ b/packages/google-maps-routing/protos/google/maps/routing/v2/polyline_details.proto @@ -0,0 +1,84 @@ +// Copyright 2024 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.maps.routing.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Maps.Routing.V2"; +option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb"; +option java_multiple_files = true; +option java_outer_classname = "PolylineDetailsProto"; +option java_package = "com.google.maps.routing.v2"; +option objc_class_prefix = "GMRV2"; +option php_namespace = "Google\\Maps\\Routing\\V2"; +option ruby_package = "Google::Maps::Routing::V2"; + +// Details corresponding to a given index or contiguous segment of a polyline. +// Given a polyline with points P_0, P_1, ... , P_N (zero-based index), the +// `PolylineDetails` defines an interval and associated metadata. +message PolylineDetails { + // Encapsulates the start and end indexes for a polyline detail. + // For instances where the data corresponds to a single point, `start_index` + // and `end_index` will be equal. + message PolylinePointIndex { + // The start index of this detail in the polyline. + optional int32 start_index = 1; + + // The end index of this detail in the polyline. + optional int32 end_index = 2; + } + + // Encapsulates the states of road features along a stretch of polyline. + enum RoadFeatureState { + // The road feature's state was not computed (default value). + ROAD_FEATURE_STATE_UNSPECIFIED = 0; + + // The road feature exists. + EXISTS = 1; + + // The road feature does not exist. + DOES_NOT_EXIST = 2; + } + + // Encapsulates information about flyovers along the polyline. + message FlyoverInfo { + // Output only. Denotes whether a flyover exists for a given stretch of the + // polyline. + RoadFeatureState flyover_presence = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The location of flyover related information along the polyline. + PolylinePointIndex polyline_point_index = 2; + } + + // Encapsulates information about narrow roads along the polyline. + message NarrowRoadInfo { + // Output only. Denotes whether a narrow road exists for a given stretch of + // the polyline. + RoadFeatureState narrow_road_presence = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The location of narrow road related information along the polyline. + PolylinePointIndex polyline_point_index = 2; + } + + // Flyover details along the polyline. + repeated FlyoverInfo flyover_info = 12; + + // Narrow road details along the polyline. + repeated NarrowRoadInfo narrow_road_info = 13; +} diff --git a/packages/google-maps-routing/protos/google/maps/routing/v2/route.proto b/packages/google-maps-routing/protos/google/maps/routing/v2/route.proto index 8d1b96e1e60..4daa1748d32 100644 --- a/packages/google-maps-routing/protos/google/maps/routing/v2/route.proto +++ b/packages/google-maps-routing/protos/google/maps/routing/v2/route.proto @@ -21,6 +21,7 @@ import "google/maps/routing/v2/localized_time.proto"; import "google/maps/routing/v2/location.proto"; import "google/maps/routing/v2/navigation_instruction.proto"; import "google/maps/routing/v2/polyline.proto"; +import "google/maps/routing/v2/polyline_details.proto"; import "google/maps/routing/v2/route_label.proto"; import "google/maps/routing/v2/route_travel_mode.proto"; import "google/maps/routing/v2/speed_reading_interval.proto"; @@ -131,6 +132,9 @@ message Route { // `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests // that have Via waypoints. string route_token = 12; + + // Contains information about details along the polyline. + PolylineDetails polyline_details = 14; } // Contains the additional information that the user should be informed diff --git a/packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto b/packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto index 2cbd7cc1280..a194cd13a21 100644 --- a/packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto +++ b/packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto @@ -180,6 +180,20 @@ message ComputeRoutesRequest { // is meant to be read as-is. This content is for display only. // Do not programmatically parse it. HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4; + + // Flyover information for the route(s). The + // `routes.polyline_details.flyover_info` fieldmask must be specified to + // return this information. This data will only currently be populated for + // certain metros in India. This feature is experimental, and the + // SKU/charge is subject to change. + FLYOVER_INFO_ON_POLYLINE = 7; + + // Narrow road information for the route(s). The + // `routes.polyline_details.narrow_road_info` fieldmask must be specified + // to return this information. This data will only currently be populated + // for certain metros in India. This feature is experimental, and the + // SKU/charge is subject to change. + NARROW_ROAD_INFO_ON_POLYLINE = 8; } // Required. Origin waypoint. diff --git a/packages/google-maps-routing/protos/protos.d.ts b/packages/google-maps-routing/protos/protos.d.ts index f8d6125983c..a80f1508b7e 100644 --- a/packages/google-maps-routing/protos/protos.d.ts +++ b/packages/google-maps-routing/protos/protos.d.ts @@ -1325,212 +1325,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - /** Properties of a FileDescriptorSet. */ interface IFileDescriptorSet { @@ -5623,6 +5417,212 @@ export namespace google { } } } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Namespace geo. */ @@ -6789,83 +6789,511 @@ export namespace google { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.routing.v2.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.routing.v2.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.maps.routing.v2.Polyline.verify|verify} messages. + * @param message Polyline message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.routing.v2.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Polyline message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Polyline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.Polyline; + + /** + * Decodes a Polyline message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Polyline + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.Polyline; + + /** + * Verifies a Polyline message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Polyline message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Polyline + */ + public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.Polyline; + + /** + * Creates a plain object from a Polyline message. Also converts values to other types if specified. + * @param message Polyline + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.routing.v2.Polyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Polyline to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Polyline + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PolylineQuality enum. */ + enum PolylineQuality { + POLYLINE_QUALITY_UNSPECIFIED = 0, + HIGH_QUALITY = 1, + OVERVIEW = 2 + } + + /** PolylineEncoding enum. */ + enum PolylineEncoding { + POLYLINE_ENCODING_UNSPECIFIED = 0, + ENCODED_POLYLINE = 1, + GEO_JSON_LINESTRING = 2 + } + + /** Properties of a PolylineDetails. */ + interface IPolylineDetails { + + /** PolylineDetails flyoverInfo */ + flyoverInfo?: (google.maps.routing.v2.PolylineDetails.IFlyoverInfo[]|null); + + /** PolylineDetails narrowRoadInfo */ + narrowRoadInfo?: (google.maps.routing.v2.PolylineDetails.INarrowRoadInfo[]|null); + } + + /** Represents a PolylineDetails. */ + class PolylineDetails implements IPolylineDetails { + + /** + * Constructs a new PolylineDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.routing.v2.IPolylineDetails); + + /** PolylineDetails flyoverInfo. */ + public flyoverInfo: google.maps.routing.v2.PolylineDetails.IFlyoverInfo[]; + + /** PolylineDetails narrowRoadInfo. */ + public narrowRoadInfo: google.maps.routing.v2.PolylineDetails.INarrowRoadInfo[]; + + /** + * Creates a new PolylineDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PolylineDetails instance + */ + public static create(properties?: google.maps.routing.v2.IPolylineDetails): google.maps.routing.v2.PolylineDetails; + + /** + * Encodes the specified PolylineDetails message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.verify|verify} messages. + * @param message PolylineDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.routing.v2.IPolylineDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.maps.routing.v2.Polyline.verify|verify} messages. - * @param message Polyline message or plain object to encode + * Encodes the specified PolylineDetails message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.verify|verify} messages. + * @param message PolylineDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.routing.v2.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.routing.v2.IPolylineDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Polyline message from the specified reader or buffer. + * Decodes a PolylineDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Polyline + * @returns PolylineDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.Polyline; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.PolylineDetails; /** - * Decodes a Polyline message from the specified reader or buffer, length delimited. + * Decodes a PolylineDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Polyline + * @returns PolylineDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.Polyline; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.PolylineDetails; /** - * Verifies a Polyline message. + * Verifies a PolylineDetails message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Polyline message from a plain object. Also converts values to their respective internal types. + * Creates a PolylineDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Polyline + * @returns PolylineDetails */ - public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.Polyline; + public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.PolylineDetails; /** - * Creates a plain object from a Polyline message. Also converts values to other types if specified. - * @param message Polyline + * Creates a plain object from a PolylineDetails message. Also converts values to other types if specified. + * @param message PolylineDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.routing.v2.Polyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.routing.v2.PolylineDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Polyline to JSON. + * Converts this PolylineDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Polyline + * Gets the default type url for PolylineDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** PolylineQuality enum. */ - enum PolylineQuality { - POLYLINE_QUALITY_UNSPECIFIED = 0, - HIGH_QUALITY = 1, - OVERVIEW = 2 - } + namespace PolylineDetails { - /** PolylineEncoding enum. */ - enum PolylineEncoding { - POLYLINE_ENCODING_UNSPECIFIED = 0, - ENCODED_POLYLINE = 1, - GEO_JSON_LINESTRING = 2 + /** Properties of a PolylinePointIndex. */ + interface IPolylinePointIndex { + + /** PolylinePointIndex startIndex */ + startIndex?: (number|null); + + /** PolylinePointIndex endIndex */ + endIndex?: (number|null); + } + + /** Represents a PolylinePointIndex. */ + class PolylinePointIndex implements IPolylinePointIndex { + + /** + * Constructs a new PolylinePointIndex. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.routing.v2.PolylineDetails.IPolylinePointIndex); + + /** PolylinePointIndex startIndex. */ + public startIndex?: (number|null); + + /** PolylinePointIndex endIndex. */ + public endIndex?: (number|null); + + /** PolylinePointIndex _startIndex. */ + public _startIndex?: "startIndex"; + + /** PolylinePointIndex _endIndex. */ + public _endIndex?: "endIndex"; + + /** + * Creates a new PolylinePointIndex instance using the specified properties. + * @param [properties] Properties to set + * @returns PolylinePointIndex instance + */ + public static create(properties?: google.maps.routing.v2.PolylineDetails.IPolylinePointIndex): google.maps.routing.v2.PolylineDetails.PolylinePointIndex; + + /** + * Encodes the specified PolylinePointIndex message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify|verify} messages. + * @param message PolylinePointIndex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.routing.v2.PolylineDetails.IPolylinePointIndex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolylinePointIndex message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify|verify} messages. + * @param message PolylinePointIndex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.routing.v2.PolylineDetails.IPolylinePointIndex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolylinePointIndex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolylinePointIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.PolylineDetails.PolylinePointIndex; + + /** + * Decodes a PolylinePointIndex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolylinePointIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.PolylineDetails.PolylinePointIndex; + + /** + * Verifies a PolylinePointIndex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolylinePointIndex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolylinePointIndex + */ + public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.PolylineDetails.PolylinePointIndex; + + /** + * Creates a plain object from a PolylinePointIndex message. Also converts values to other types if specified. + * @param message PolylinePointIndex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.routing.v2.PolylineDetails.PolylinePointIndex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolylinePointIndex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolylinePointIndex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RoadFeatureState enum. */ + enum RoadFeatureState { + ROAD_FEATURE_STATE_UNSPECIFIED = 0, + EXISTS = 1, + DOES_NOT_EXIST = 2 + } + + /** Properties of a FlyoverInfo. */ + interface IFlyoverInfo { + + /** FlyoverInfo flyoverPresence */ + flyoverPresence?: (google.maps.routing.v2.PolylineDetails.RoadFeatureState|keyof typeof google.maps.routing.v2.PolylineDetails.RoadFeatureState|null); + + /** FlyoverInfo polylinePointIndex */ + polylinePointIndex?: (google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null); + } + + /** Represents a FlyoverInfo. */ + class FlyoverInfo implements IFlyoverInfo { + + /** + * Constructs a new FlyoverInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.routing.v2.PolylineDetails.IFlyoverInfo); + + /** FlyoverInfo flyoverPresence. */ + public flyoverPresence: (google.maps.routing.v2.PolylineDetails.RoadFeatureState|keyof typeof google.maps.routing.v2.PolylineDetails.RoadFeatureState); + + /** FlyoverInfo polylinePointIndex. */ + public polylinePointIndex?: (google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null); + + /** + * Creates a new FlyoverInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FlyoverInfo instance + */ + public static create(properties?: google.maps.routing.v2.PolylineDetails.IFlyoverInfo): google.maps.routing.v2.PolylineDetails.FlyoverInfo; + + /** + * Encodes the specified FlyoverInfo message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.FlyoverInfo.verify|verify} messages. + * @param message FlyoverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.routing.v2.PolylineDetails.IFlyoverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FlyoverInfo message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.FlyoverInfo.verify|verify} messages. + * @param message FlyoverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.routing.v2.PolylineDetails.IFlyoverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FlyoverInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FlyoverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.PolylineDetails.FlyoverInfo; + + /** + * Decodes a FlyoverInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FlyoverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.PolylineDetails.FlyoverInfo; + + /** + * Verifies a FlyoverInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FlyoverInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FlyoverInfo + */ + public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.PolylineDetails.FlyoverInfo; + + /** + * Creates a plain object from a FlyoverInfo message. Also converts values to other types if specified. + * @param message FlyoverInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.routing.v2.PolylineDetails.FlyoverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FlyoverInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FlyoverInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NarrowRoadInfo. */ + interface INarrowRoadInfo { + + /** NarrowRoadInfo narrowRoadPresence */ + narrowRoadPresence?: (google.maps.routing.v2.PolylineDetails.RoadFeatureState|keyof typeof google.maps.routing.v2.PolylineDetails.RoadFeatureState|null); + + /** NarrowRoadInfo polylinePointIndex */ + polylinePointIndex?: (google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null); + } + + /** Represents a NarrowRoadInfo. */ + class NarrowRoadInfo implements INarrowRoadInfo { + + /** + * Constructs a new NarrowRoadInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.routing.v2.PolylineDetails.INarrowRoadInfo); + + /** NarrowRoadInfo narrowRoadPresence. */ + public narrowRoadPresence: (google.maps.routing.v2.PolylineDetails.RoadFeatureState|keyof typeof google.maps.routing.v2.PolylineDetails.RoadFeatureState); + + /** NarrowRoadInfo polylinePointIndex. */ + public polylinePointIndex?: (google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null); + + /** + * Creates a new NarrowRoadInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NarrowRoadInfo instance + */ + public static create(properties?: google.maps.routing.v2.PolylineDetails.INarrowRoadInfo): google.maps.routing.v2.PolylineDetails.NarrowRoadInfo; + + /** + * Encodes the specified NarrowRoadInfo message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.verify|verify} messages. + * @param message NarrowRoadInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.routing.v2.PolylineDetails.INarrowRoadInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NarrowRoadInfo message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.verify|verify} messages. + * @param message NarrowRoadInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.routing.v2.PolylineDetails.INarrowRoadInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NarrowRoadInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NarrowRoadInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routing.v2.PolylineDetails.NarrowRoadInfo; + + /** + * Decodes a NarrowRoadInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NarrowRoadInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routing.v2.PolylineDetails.NarrowRoadInfo; + + /** + * Verifies a NarrowRoadInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NarrowRoadInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NarrowRoadInfo + */ + public static fromObject(object: { [k: string]: any }): google.maps.routing.v2.PolylineDetails.NarrowRoadInfo; + + /** + * Creates a plain object from a NarrowRoadInfo message. Also converts values to other types if specified. + * @param message NarrowRoadInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.routing.v2.PolylineDetails.NarrowRoadInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NarrowRoadInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NarrowRoadInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a Route. */ @@ -6909,6 +7337,9 @@ export namespace google { /** Route routeToken */ routeToken?: (string|null); + + /** Route polylineDetails */ + polylineDetails?: (google.maps.routing.v2.IPolylineDetails|null); } /** Represents a Route. */ @@ -6959,6 +7390,9 @@ export namespace google { /** Route routeToken. */ public routeToken: string; + /** Route polylineDetails. */ + public polylineDetails?: (google.maps.routing.v2.IPolylineDetails|null); + /** * Creates a new Route instance using the specified properties. * @param [properties] Properties to set @@ -9930,7 +10364,9 @@ export namespace google { TOLLS = 1, FUEL_CONSUMPTION = 2, TRAFFIC_ON_POLYLINE = 3, - HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4 + HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4, + FLYOVER_INFO_ON_POLYLINE = 7, + NARROW_ROAD_INFO_ON_POLYLINE = 8 } } @@ -11092,6 +11528,19 @@ export namespace google { /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + /** Properties of a Http. */ interface IHttp { @@ -12938,18 +13387,5 @@ export namespace google { GA = 4, DEPRECATED = 5 } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } } } diff --git a/packages/google-maps-routing/protos/protos.js b/packages/google-maps-routing/protos/protos.js index 5444bf92913..977f39eac15 100644 --- a/packages/google-maps-routing/protos/protos.js +++ b/packages/google-maps-routing/protos/protos.js @@ -3021,488 +3021,6 @@ return ListValue; })(); - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - protobuf.FileDescriptorSet = (function() { /** @@ -15390,6 +14908,488 @@ return GeneratedCodeInfo; })(); + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + return protobuf; })(); @@ -18487,6 +18487,1062 @@ return values; })(); + v2.PolylineDetails = (function() { + + /** + * Properties of a PolylineDetails. + * @memberof google.maps.routing.v2 + * @interface IPolylineDetails + * @property {Array.|null} [flyoverInfo] PolylineDetails flyoverInfo + * @property {Array.|null} [narrowRoadInfo] PolylineDetails narrowRoadInfo + */ + + /** + * Constructs a new PolylineDetails. + * @memberof google.maps.routing.v2 + * @classdesc Represents a PolylineDetails. + * @implements IPolylineDetails + * @constructor + * @param {google.maps.routing.v2.IPolylineDetails=} [properties] Properties to set + */ + function PolylineDetails(properties) { + this.flyoverInfo = []; + this.narrowRoadInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolylineDetails flyoverInfo. + * @member {Array.} flyoverInfo + * @memberof google.maps.routing.v2.PolylineDetails + * @instance + */ + PolylineDetails.prototype.flyoverInfo = $util.emptyArray; + + /** + * PolylineDetails narrowRoadInfo. + * @member {Array.} narrowRoadInfo + * @memberof google.maps.routing.v2.PolylineDetails + * @instance + */ + PolylineDetails.prototype.narrowRoadInfo = $util.emptyArray; + + /** + * Creates a new PolylineDetails instance using the specified properties. + * @function create + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {google.maps.routing.v2.IPolylineDetails=} [properties] Properties to set + * @returns {google.maps.routing.v2.PolylineDetails} PolylineDetails instance + */ + PolylineDetails.create = function create(properties) { + return new PolylineDetails(properties); + }; + + /** + * Encodes the specified PolylineDetails message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.verify|verify} messages. + * @function encode + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {google.maps.routing.v2.IPolylineDetails} message PolylineDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolylineDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flyoverInfo != null && message.flyoverInfo.length) + for (var i = 0; i < message.flyoverInfo.length; ++i) + $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo.encode(message.flyoverInfo[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.narrowRoadInfo != null && message.narrowRoadInfo.length) + for (var i = 0; i < message.narrowRoadInfo.length; ++i) + $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.encode(message.narrowRoadInfo[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolylineDetails message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {google.maps.routing.v2.IPolylineDetails} message PolylineDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolylineDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolylineDetails message from the specified reader or buffer. + * @function decode + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.routing.v2.PolylineDetails} PolylineDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolylineDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.routing.v2.PolylineDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: { + if (!(message.flyoverInfo && message.flyoverInfo.length)) + message.flyoverInfo = []; + message.flyoverInfo.push($root.google.maps.routing.v2.PolylineDetails.FlyoverInfo.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.narrowRoadInfo && message.narrowRoadInfo.length)) + message.narrowRoadInfo = []; + message.narrowRoadInfo.push($root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolylineDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.routing.v2.PolylineDetails} PolylineDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolylineDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolylineDetails message. + * @function verify + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolylineDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flyoverInfo != null && message.hasOwnProperty("flyoverInfo")) { + if (!Array.isArray(message.flyoverInfo)) + return "flyoverInfo: array expected"; + for (var i = 0; i < message.flyoverInfo.length; ++i) { + var error = $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo.verify(message.flyoverInfo[i]); + if (error) + return "flyoverInfo." + error; + } + } + if (message.narrowRoadInfo != null && message.hasOwnProperty("narrowRoadInfo")) { + if (!Array.isArray(message.narrowRoadInfo)) + return "narrowRoadInfo: array expected"; + for (var i = 0; i < message.narrowRoadInfo.length; ++i) { + var error = $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.verify(message.narrowRoadInfo[i]); + if (error) + return "narrowRoadInfo." + error; + } + } + return null; + }; + + /** + * Creates a PolylineDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {Object.} object Plain object + * @returns {google.maps.routing.v2.PolylineDetails} PolylineDetails + */ + PolylineDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.routing.v2.PolylineDetails) + return object; + var message = new $root.google.maps.routing.v2.PolylineDetails(); + if (object.flyoverInfo) { + if (!Array.isArray(object.flyoverInfo)) + throw TypeError(".google.maps.routing.v2.PolylineDetails.flyoverInfo: array expected"); + message.flyoverInfo = []; + for (var i = 0; i < object.flyoverInfo.length; ++i) { + if (typeof object.flyoverInfo[i] !== "object") + throw TypeError(".google.maps.routing.v2.PolylineDetails.flyoverInfo: object expected"); + message.flyoverInfo[i] = $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo.fromObject(object.flyoverInfo[i]); + } + } + if (object.narrowRoadInfo) { + if (!Array.isArray(object.narrowRoadInfo)) + throw TypeError(".google.maps.routing.v2.PolylineDetails.narrowRoadInfo: array expected"); + message.narrowRoadInfo = []; + for (var i = 0; i < object.narrowRoadInfo.length; ++i) { + if (typeof object.narrowRoadInfo[i] !== "object") + throw TypeError(".google.maps.routing.v2.PolylineDetails.narrowRoadInfo: object expected"); + message.narrowRoadInfo[i] = $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.fromObject(object.narrowRoadInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolylineDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {google.maps.routing.v2.PolylineDetails} message PolylineDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolylineDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.flyoverInfo = []; + object.narrowRoadInfo = []; + } + if (message.flyoverInfo && message.flyoverInfo.length) { + object.flyoverInfo = []; + for (var j = 0; j < message.flyoverInfo.length; ++j) + object.flyoverInfo[j] = $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo.toObject(message.flyoverInfo[j], options); + } + if (message.narrowRoadInfo && message.narrowRoadInfo.length) { + object.narrowRoadInfo = []; + for (var j = 0; j < message.narrowRoadInfo.length; ++j) + object.narrowRoadInfo[j] = $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.toObject(message.narrowRoadInfo[j], options); + } + return object; + }; + + /** + * Converts this PolylineDetails to JSON. + * @function toJSON + * @memberof google.maps.routing.v2.PolylineDetails + * @instance + * @returns {Object.} JSON object + */ + PolylineDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolylineDetails + * @function getTypeUrl + * @memberof google.maps.routing.v2.PolylineDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolylineDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.routing.v2.PolylineDetails"; + }; + + PolylineDetails.PolylinePointIndex = (function() { + + /** + * Properties of a PolylinePointIndex. + * @memberof google.maps.routing.v2.PolylineDetails + * @interface IPolylinePointIndex + * @property {number|null} [startIndex] PolylinePointIndex startIndex + * @property {number|null} [endIndex] PolylinePointIndex endIndex + */ + + /** + * Constructs a new PolylinePointIndex. + * @memberof google.maps.routing.v2.PolylineDetails + * @classdesc Represents a PolylinePointIndex. + * @implements IPolylinePointIndex + * @constructor + * @param {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex=} [properties] Properties to set + */ + function PolylinePointIndex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolylinePointIndex startIndex. + * @member {number|null|undefined} startIndex + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @instance + */ + PolylinePointIndex.prototype.startIndex = null; + + /** + * PolylinePointIndex endIndex. + * @member {number|null|undefined} endIndex + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @instance + */ + PolylinePointIndex.prototype.endIndex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PolylinePointIndex _startIndex. + * @member {"startIndex"|undefined} _startIndex + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @instance + */ + Object.defineProperty(PolylinePointIndex.prototype, "_startIndex", { + get: $util.oneOfGetter($oneOfFields = ["startIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PolylinePointIndex _endIndex. + * @member {"endIndex"|undefined} _endIndex + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @instance + */ + Object.defineProperty(PolylinePointIndex.prototype, "_endIndex", { + get: $util.oneOfGetter($oneOfFields = ["endIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PolylinePointIndex instance using the specified properties. + * @function create + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex=} [properties] Properties to set + * @returns {google.maps.routing.v2.PolylineDetails.PolylinePointIndex} PolylinePointIndex instance + */ + PolylinePointIndex.create = function create(properties) { + return new PolylinePointIndex(properties); + }; + + /** + * Encodes the specified PolylinePointIndex message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify|verify} messages. + * @function encode + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex} message PolylinePointIndex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolylinePointIndex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startIndex != null && Object.hasOwnProperty.call(message, "startIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startIndex); + if (message.endIndex != null && Object.hasOwnProperty.call(message, "endIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endIndex); + return writer; + }; + + /** + * Encodes the specified PolylinePointIndex message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex} message PolylinePointIndex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolylinePointIndex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolylinePointIndex message from the specified reader or buffer. + * @function decode + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.routing.v2.PolylineDetails.PolylinePointIndex} PolylinePointIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolylinePointIndex.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startIndex = reader.int32(); + break; + } + case 2: { + message.endIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolylinePointIndex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.routing.v2.PolylineDetails.PolylinePointIndex} PolylinePointIndex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolylinePointIndex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolylinePointIndex message. + * @function verify + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolylinePointIndex.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) { + properties._startIndex = 1; + if (!$util.isInteger(message.startIndex)) + return "startIndex: integer expected"; + } + if (message.endIndex != null && message.hasOwnProperty("endIndex")) { + properties._endIndex = 1; + if (!$util.isInteger(message.endIndex)) + return "endIndex: integer expected"; + } + return null; + }; + + /** + * Creates a PolylinePointIndex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {Object.} object Plain object + * @returns {google.maps.routing.v2.PolylineDetails.PolylinePointIndex} PolylinePointIndex + */ + PolylinePointIndex.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex) + return object; + var message = new $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex(); + if (object.startIndex != null) + message.startIndex = object.startIndex | 0; + if (object.endIndex != null) + message.endIndex = object.endIndex | 0; + return message; + }; + + /** + * Creates a plain object from a PolylinePointIndex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {google.maps.routing.v2.PolylineDetails.PolylinePointIndex} message PolylinePointIndex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolylinePointIndex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) { + object.startIndex = message.startIndex; + if (options.oneofs) + object._startIndex = "startIndex"; + } + if (message.endIndex != null && message.hasOwnProperty("endIndex")) { + object.endIndex = message.endIndex; + if (options.oneofs) + object._endIndex = "endIndex"; + } + return object; + }; + + /** + * Converts this PolylinePointIndex to JSON. + * @function toJSON + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @instance + * @returns {Object.} JSON object + */ + PolylinePointIndex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolylinePointIndex + * @function getTypeUrl + * @memberof google.maps.routing.v2.PolylineDetails.PolylinePointIndex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolylinePointIndex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.routing.v2.PolylineDetails.PolylinePointIndex"; + }; + + return PolylinePointIndex; + })(); + + /** + * RoadFeatureState enum. + * @name google.maps.routing.v2.PolylineDetails.RoadFeatureState + * @enum {number} + * @property {number} ROAD_FEATURE_STATE_UNSPECIFIED=0 ROAD_FEATURE_STATE_UNSPECIFIED value + * @property {number} EXISTS=1 EXISTS value + * @property {number} DOES_NOT_EXIST=2 DOES_NOT_EXIST value + */ + PolylineDetails.RoadFeatureState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROAD_FEATURE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXISTS"] = 1; + values[valuesById[2] = "DOES_NOT_EXIST"] = 2; + return values; + })(); + + PolylineDetails.FlyoverInfo = (function() { + + /** + * Properties of a FlyoverInfo. + * @memberof google.maps.routing.v2.PolylineDetails + * @interface IFlyoverInfo + * @property {google.maps.routing.v2.PolylineDetails.RoadFeatureState|null} [flyoverPresence] FlyoverInfo flyoverPresence + * @property {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null} [polylinePointIndex] FlyoverInfo polylinePointIndex + */ + + /** + * Constructs a new FlyoverInfo. + * @memberof google.maps.routing.v2.PolylineDetails + * @classdesc Represents a FlyoverInfo. + * @implements IFlyoverInfo + * @constructor + * @param {google.maps.routing.v2.PolylineDetails.IFlyoverInfo=} [properties] Properties to set + */ + function FlyoverInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FlyoverInfo flyoverPresence. + * @member {google.maps.routing.v2.PolylineDetails.RoadFeatureState} flyoverPresence + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @instance + */ + FlyoverInfo.prototype.flyoverPresence = 0; + + /** + * FlyoverInfo polylinePointIndex. + * @member {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null|undefined} polylinePointIndex + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @instance + */ + FlyoverInfo.prototype.polylinePointIndex = null; + + /** + * Creates a new FlyoverInfo instance using the specified properties. + * @function create + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.IFlyoverInfo=} [properties] Properties to set + * @returns {google.maps.routing.v2.PolylineDetails.FlyoverInfo} FlyoverInfo instance + */ + FlyoverInfo.create = function create(properties) { + return new FlyoverInfo(properties); + }; + + /** + * Encodes the specified FlyoverInfo message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.FlyoverInfo.verify|verify} messages. + * @function encode + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.IFlyoverInfo} message FlyoverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlyoverInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flyoverPresence != null && Object.hasOwnProperty.call(message, "flyoverPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.flyoverPresence); + if (message.polylinePointIndex != null && Object.hasOwnProperty.call(message, "polylinePointIndex")) + $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.encode(message.polylinePointIndex, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FlyoverInfo message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.FlyoverInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.IFlyoverInfo} message FlyoverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlyoverInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FlyoverInfo message from the specified reader or buffer. + * @function decode + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.routing.v2.PolylineDetails.FlyoverInfo} FlyoverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlyoverInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.flyoverPresence = reader.int32(); + break; + } + case 2: { + message.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FlyoverInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.routing.v2.PolylineDetails.FlyoverInfo} FlyoverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlyoverInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FlyoverInfo message. + * @function verify + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FlyoverInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flyoverPresence != null && message.hasOwnProperty("flyoverPresence")) + switch (message.flyoverPresence) { + default: + return "flyoverPresence: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.polylinePointIndex != null && message.hasOwnProperty("polylinePointIndex")) { + var error = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify(message.polylinePointIndex); + if (error) + return "polylinePointIndex." + error; + } + return null; + }; + + /** + * Creates a FlyoverInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {Object.} object Plain object + * @returns {google.maps.routing.v2.PolylineDetails.FlyoverInfo} FlyoverInfo + */ + FlyoverInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo) + return object; + var message = new $root.google.maps.routing.v2.PolylineDetails.FlyoverInfo(); + switch (object.flyoverPresence) { + default: + if (typeof object.flyoverPresence === "number") { + message.flyoverPresence = object.flyoverPresence; + break; + } + break; + case "ROAD_FEATURE_STATE_UNSPECIFIED": + case 0: + message.flyoverPresence = 0; + break; + case "EXISTS": + case 1: + message.flyoverPresence = 1; + break; + case "DOES_NOT_EXIST": + case 2: + message.flyoverPresence = 2; + break; + } + if (object.polylinePointIndex != null) { + if (typeof object.polylinePointIndex !== "object") + throw TypeError(".google.maps.routing.v2.PolylineDetails.FlyoverInfo.polylinePointIndex: object expected"); + message.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.fromObject(object.polylinePointIndex); + } + return message; + }; + + /** + * Creates a plain object from a FlyoverInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.FlyoverInfo} message FlyoverInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FlyoverInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.flyoverPresence = options.enums === String ? "ROAD_FEATURE_STATE_UNSPECIFIED" : 0; + object.polylinePointIndex = null; + } + if (message.flyoverPresence != null && message.hasOwnProperty("flyoverPresence")) + object.flyoverPresence = options.enums === String ? $root.google.maps.routing.v2.PolylineDetails.RoadFeatureState[message.flyoverPresence] === undefined ? message.flyoverPresence : $root.google.maps.routing.v2.PolylineDetails.RoadFeatureState[message.flyoverPresence] : message.flyoverPresence; + if (message.polylinePointIndex != null && message.hasOwnProperty("polylinePointIndex")) + object.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.toObject(message.polylinePointIndex, options); + return object; + }; + + /** + * Converts this FlyoverInfo to JSON. + * @function toJSON + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @instance + * @returns {Object.} JSON object + */ + FlyoverInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FlyoverInfo + * @function getTypeUrl + * @memberof google.maps.routing.v2.PolylineDetails.FlyoverInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FlyoverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.routing.v2.PolylineDetails.FlyoverInfo"; + }; + + return FlyoverInfo; + })(); + + PolylineDetails.NarrowRoadInfo = (function() { + + /** + * Properties of a NarrowRoadInfo. + * @memberof google.maps.routing.v2.PolylineDetails + * @interface INarrowRoadInfo + * @property {google.maps.routing.v2.PolylineDetails.RoadFeatureState|null} [narrowRoadPresence] NarrowRoadInfo narrowRoadPresence + * @property {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null} [polylinePointIndex] NarrowRoadInfo polylinePointIndex + */ + + /** + * Constructs a new NarrowRoadInfo. + * @memberof google.maps.routing.v2.PolylineDetails + * @classdesc Represents a NarrowRoadInfo. + * @implements INarrowRoadInfo + * @constructor + * @param {google.maps.routing.v2.PolylineDetails.INarrowRoadInfo=} [properties] Properties to set + */ + function NarrowRoadInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NarrowRoadInfo narrowRoadPresence. + * @member {google.maps.routing.v2.PolylineDetails.RoadFeatureState} narrowRoadPresence + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @instance + */ + NarrowRoadInfo.prototype.narrowRoadPresence = 0; + + /** + * NarrowRoadInfo polylinePointIndex. + * @member {google.maps.routing.v2.PolylineDetails.IPolylinePointIndex|null|undefined} polylinePointIndex + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @instance + */ + NarrowRoadInfo.prototype.polylinePointIndex = null; + + /** + * Creates a new NarrowRoadInfo instance using the specified properties. + * @function create + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.INarrowRoadInfo=} [properties] Properties to set + * @returns {google.maps.routing.v2.PolylineDetails.NarrowRoadInfo} NarrowRoadInfo instance + */ + NarrowRoadInfo.create = function create(properties) { + return new NarrowRoadInfo(properties); + }; + + /** + * Encodes the specified NarrowRoadInfo message. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.verify|verify} messages. + * @function encode + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.INarrowRoadInfo} message NarrowRoadInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NarrowRoadInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.narrowRoadPresence != null && Object.hasOwnProperty.call(message, "narrowRoadPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.narrowRoadPresence); + if (message.polylinePointIndex != null && Object.hasOwnProperty.call(message, "polylinePointIndex")) + $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.encode(message.polylinePointIndex, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NarrowRoadInfo message, length delimited. Does not implicitly {@link google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.INarrowRoadInfo} message NarrowRoadInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NarrowRoadInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NarrowRoadInfo message from the specified reader or buffer. + * @function decode + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.routing.v2.PolylineDetails.NarrowRoadInfo} NarrowRoadInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NarrowRoadInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.narrowRoadPresence = reader.int32(); + break; + } + case 2: { + message.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NarrowRoadInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.routing.v2.PolylineDetails.NarrowRoadInfo} NarrowRoadInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NarrowRoadInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NarrowRoadInfo message. + * @function verify + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NarrowRoadInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.narrowRoadPresence != null && message.hasOwnProperty("narrowRoadPresence")) + switch (message.narrowRoadPresence) { + default: + return "narrowRoadPresence: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.polylinePointIndex != null && message.hasOwnProperty("polylinePointIndex")) { + var error = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.verify(message.polylinePointIndex); + if (error) + return "polylinePointIndex." + error; + } + return null; + }; + + /** + * Creates a NarrowRoadInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {Object.} object Plain object + * @returns {google.maps.routing.v2.PolylineDetails.NarrowRoadInfo} NarrowRoadInfo + */ + NarrowRoadInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo) + return object; + var message = new $root.google.maps.routing.v2.PolylineDetails.NarrowRoadInfo(); + switch (object.narrowRoadPresence) { + default: + if (typeof object.narrowRoadPresence === "number") { + message.narrowRoadPresence = object.narrowRoadPresence; + break; + } + break; + case "ROAD_FEATURE_STATE_UNSPECIFIED": + case 0: + message.narrowRoadPresence = 0; + break; + case "EXISTS": + case 1: + message.narrowRoadPresence = 1; + break; + case "DOES_NOT_EXIST": + case 2: + message.narrowRoadPresence = 2; + break; + } + if (object.polylinePointIndex != null) { + if (typeof object.polylinePointIndex !== "object") + throw TypeError(".google.maps.routing.v2.PolylineDetails.NarrowRoadInfo.polylinePointIndex: object expected"); + message.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.fromObject(object.polylinePointIndex); + } + return message; + }; + + /** + * Creates a plain object from a NarrowRoadInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {google.maps.routing.v2.PolylineDetails.NarrowRoadInfo} message NarrowRoadInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NarrowRoadInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.narrowRoadPresence = options.enums === String ? "ROAD_FEATURE_STATE_UNSPECIFIED" : 0; + object.polylinePointIndex = null; + } + if (message.narrowRoadPresence != null && message.hasOwnProperty("narrowRoadPresence")) + object.narrowRoadPresence = options.enums === String ? $root.google.maps.routing.v2.PolylineDetails.RoadFeatureState[message.narrowRoadPresence] === undefined ? message.narrowRoadPresence : $root.google.maps.routing.v2.PolylineDetails.RoadFeatureState[message.narrowRoadPresence] : message.narrowRoadPresence; + if (message.polylinePointIndex != null && message.hasOwnProperty("polylinePointIndex")) + object.polylinePointIndex = $root.google.maps.routing.v2.PolylineDetails.PolylinePointIndex.toObject(message.polylinePointIndex, options); + return object; + }; + + /** + * Converts this NarrowRoadInfo to JSON. + * @function toJSON + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @instance + * @returns {Object.} JSON object + */ + NarrowRoadInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NarrowRoadInfo + * @function getTypeUrl + * @memberof google.maps.routing.v2.PolylineDetails.NarrowRoadInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NarrowRoadInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.routing.v2.PolylineDetails.NarrowRoadInfo"; + }; + + return NarrowRoadInfo; + })(); + + return PolylineDetails; + })(); + v2.Route = (function() { /** @@ -18506,6 +19562,7 @@ * @property {Array.|null} [optimizedIntermediateWaypointIndex] Route optimizedIntermediateWaypointIndex * @property {google.maps.routing.v2.Route.IRouteLocalizedValues|null} [localizedValues] Route localizedValues * @property {string|null} [routeToken] Route routeToken + * @property {google.maps.routing.v2.IPolylineDetails|null} [polylineDetails] Route polylineDetails */ /** @@ -18631,6 +19688,14 @@ */ Route.prototype.routeToken = ""; + /** + * Route polylineDetails. + * @member {google.maps.routing.v2.IPolylineDetails|null|undefined} polylineDetails + * @memberof google.maps.routing.v2.Route + * @instance + */ + Route.prototype.polylineDetails = null; + /** * Creates a new Route instance using the specified properties. * @function create @@ -18691,6 +19756,8 @@ writer.int32(message.routeLabels[i]); writer.ldelim(); } + if (message.polylineDetails != null && Object.hasOwnProperty.call(message, "polylineDetails")) + $root.google.maps.routing.v2.PolylineDetails.encode(message.polylineDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -18795,6 +19862,10 @@ message.routeToken = reader.string(); break; } + case 14: { + message.polylineDetails = $root.google.maps.routing.v2.PolylineDetails.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18907,6 +19978,11 @@ if (message.routeToken != null && message.hasOwnProperty("routeToken")) if (!$util.isString(message.routeToken)) return "routeToken: string expected"; + if (message.polylineDetails != null && message.hasOwnProperty("polylineDetails")) { + var error = $root.google.maps.routing.v2.PolylineDetails.verify(message.polylineDetails); + if (error) + return "polylineDetails." + error; + } return null; }; @@ -19015,6 +20091,11 @@ } if (object.routeToken != null) message.routeToken = String(object.routeToken); + if (object.polylineDetails != null) { + if (typeof object.polylineDetails !== "object") + throw TypeError(".google.maps.routing.v2.Route.polylineDetails: object expected"); + message.polylineDetails = $root.google.maps.routing.v2.PolylineDetails.fromObject(object.polylineDetails); + } return message; }; @@ -19047,6 +20128,7 @@ object.travelAdvisory = null; object.localizedValues = null; object.routeToken = ""; + object.polylineDetails = null; } if (message.legs && message.legs.length) { object.legs = []; @@ -19086,6 +20168,8 @@ for (var j = 0; j < message.routeLabels.length; ++j) object.routeLabels[j] = options.enums === String ? $root.google.maps.routing.v2.RouteLabel[message.routeLabels[j]] === undefined ? message.routeLabels[j] : $root.google.maps.routing.v2.RouteLabel[message.routeLabels[j]] : message.routeLabels[j]; } + if (message.polylineDetails != null && message.hasOwnProperty("polylineDetails")) + object.polylineDetails = $root.google.maps.routing.v2.PolylineDetails.toObject(message.polylineDetails, options); return object; }; @@ -27044,6 +28128,8 @@ case 2: case 3: case 4: + case 7: + case 8: break; } } @@ -27292,6 +28378,14 @@ case 4: message.extraComputations[i] = 4; break; + case "FLYOVER_INFO_ON_POLYLINE": + case 7: + message.extraComputations[i] = 7; + break; + case "NARROW_ROAD_INFO_ON_POLYLINE": + case 8: + message.extraComputations[i] = 8; + break; } } switch (object.trafficModel) { @@ -27463,6 +28557,8 @@ * @property {number} FUEL_CONSUMPTION=2 FUEL_CONSUMPTION value * @property {number} TRAFFIC_ON_POLYLINE=3 TRAFFIC_ON_POLYLINE value * @property {number} HTML_FORMATTED_NAVIGATION_INSTRUCTIONS=4 HTML_FORMATTED_NAVIGATION_INSTRUCTIONS value + * @property {number} FLYOVER_INFO_ON_POLYLINE=7 FLYOVER_INFO_ON_POLYLINE value + * @property {number} NARROW_ROAD_INFO_ON_POLYLINE=8 NARROW_ROAD_INFO_ON_POLYLINE value */ ComputeRoutesRequest.ExtraComputation = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -27471,6 +28567,8 @@ values[valuesById[2] = "FUEL_CONSUMPTION"] = 2; values[valuesById[3] = "TRAFFIC_ON_POLYLINE"] = 3; values[valuesById[4] = "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS"] = 4; + values[valuesById[7] = "FLYOVER_INFO_ON_POLYLINE"] = 7; + values[valuesById[8] = "NARROW_ROAD_INFO_ON_POLYLINE"] = 8; return values; })(); @@ -30768,6 +31866,34 @@ */ var api = {}; + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + api.Http = (function() { /** @@ -35660,34 +36786,6 @@ return values; })(); - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - return api; })(); diff --git a/packages/google-maps-routing/protos/protos.json b/packages/google-maps-routing/protos/protos.json index 0151cfa5aa0..cad494957dd 100644 --- a/packages/google-maps-routing/protos/protos.json +++ b/packages/google-maps-routing/protos/protos.json @@ -163,30 +163,6 @@ } } }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "FileDescriptorSet": { "fields": { "file": { @@ -1450,6 +1426,30 @@ } } } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } } } }, @@ -1722,6 +1722,89 @@ "GEO_JSON_LINESTRING": 2 } }, + "PolylineDetails": { + "fields": { + "flyoverInfo": { + "rule": "repeated", + "type": "FlyoverInfo", + "id": 12 + }, + "narrowRoadInfo": { + "rule": "repeated", + "type": "NarrowRoadInfo", + "id": 13 + } + }, + "nested": { + "PolylinePointIndex": { + "oneofs": { + "_startIndex": { + "oneof": [ + "startIndex" + ] + }, + "_endIndex": { + "oneof": [ + "endIndex" + ] + } + }, + "fields": { + "startIndex": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "endIndex": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "RoadFeatureState": { + "values": { + "ROAD_FEATURE_STATE_UNSPECIFIED": 0, + "EXISTS": 1, + "DOES_NOT_EXIST": 2 + } + }, + "FlyoverInfo": { + "fields": { + "flyoverPresence": { + "type": "RoadFeatureState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "polylinePointIndex": { + "type": "PolylinePointIndex", + "id": 2 + } + } + }, + "NarrowRoadInfo": { + "fields": { + "narrowRoadPresence": { + "type": "RoadFeatureState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "polylinePointIndex": { + "type": "PolylinePointIndex", + "id": 2 + } + } + } + } + }, "Route": { "fields": { "routeLabels": { @@ -1779,6 +1862,10 @@ "routeToken": { "type": "string", "id": 12 + }, + "polylineDetails": { + "type": "PolylineDetails", + "id": 14 } }, "nested": { @@ -2621,7 +2708,9 @@ "TOLLS": 1, "FUEL_CONSUMPTION": 2, "TRAFFIC_ON_POLYLINE": 3, - "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4 + "HTML_FORMATTED_NAVIGATION_INSTRUCTIONS": 4, + "FLYOVER_INFO_ON_POLYLINE": 7, + "NARROW_ROAD_INFO_ON_POLYLINE": 8 } } } @@ -2991,14 +3080,33 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "go_package": "google.golang.org/genproto/googleapis/api;api", "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", + "java_outer_classname": "LaunchStageProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -3380,25 +3488,6 @@ "GA": 4, "DEPRECATED": 5 } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } } } } diff --git a/packages/google-maps-routing/src/v2/routes_proto_list.json b/packages/google-maps-routing/src/v2/routes_proto_list.json index a32ecb29518..2d096dec5da 100644 --- a/packages/google-maps-routing/src/v2/routes_proto_list.json +++ b/packages/google-maps-routing/src/v2/routes_proto_list.json @@ -7,6 +7,7 @@ "../../protos/google/maps/routing/v2/maneuver.proto", "../../protos/google/maps/routing/v2/navigation_instruction.proto", "../../protos/google/maps/routing/v2/polyline.proto", + "../../protos/google/maps/routing/v2/polyline_details.proto", "../../protos/google/maps/routing/v2/route.proto", "../../protos/google/maps/routing/v2/route_label.proto", "../../protos/google/maps/routing/v2/route_modifiers.proto", From a74f10708208dd1c3f9e83b016cac371f1522dd6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:17:24 -0800 Subject: [PATCH 3/6] docs: [batch] clarify options for logs (#5864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: clarify options for logs docs: Clarify the custom instance template needs to be in the same project PiperOrigin-RevId: 702966613 Source-Link: https://github.com/googleapis/googleapis/commit/2cb4e7a6f328b0a017e040e2c6150c17ef6bea61 Source-Link: https://github.com/googleapis/googleapis-gen/commit/14a9205201b8000a2fedda894e105256ceed9075 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiIxNGE5MjA1MjAxYjgwMDBhMmZlZGRhODk0ZTEwNTI1NmNlZWQ5MDc1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: clarify options for logs docs: clarify the custom instance template needs to be in the same project PiperOrigin-RevId: 703266926 Source-Link: https://github.com/googleapis/googleapis/commit/3735100771044022d9e57f25fdbf0e67f45a857e Source-Link: https://github.com/googleapis/googleapis-gen/commit/4190d79c5b8e8f62f66db0e1c182308b8037b94a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI0MTkwZDc5YzViOGU4ZjYyZjY2ZGIwZTFjMTgyMzA4YjgwMzdiOTRhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../protos/google/cloud/batch/v1/job.proto | 35 ++++++++++++------- .../google/cloud/batch/v1alpha/job.proto | 35 ++++++++++++------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto index a537b67e50f..a215c35b837 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto @@ -90,13 +90,15 @@ message Job { repeated JobNotification notifications = 14; } -// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be -// preserved. +// LogsPolicy describes if and how a job's logs are preserved. Logs include +// information that is automatically written by the Batch service agent and any +// information that you configured the job's runnables to write to the `stdout` +// or `stderr` streams. message LogsPolicy { // `CloudLoggingOption` contains additional settings for Cloud Logging logs // generated by Batch job. message CloudLoggingOption { - // Optional. Set this flag to true to change the [monitored resource + // Optional. Set this field to `true` to change the [monitored resource // type](https://cloud.google.com/monitoring/api/resources) for // Cloud Logging logs generated by this Batch job from // the @@ -110,26 +112,32 @@ message LogsPolicy { // The destination (if any) for logs. enum Destination { - // Logs are not preserved. + // (Default) Logs are not preserved. DESTINATION_UNSPECIFIED = 0; - // Logs are streamed to Cloud Logging. + // Logs are streamed to Cloud Logging. Optionally, you can configure + // additional settings in the `cloudLoggingOption` field. CLOUD_LOGGING = 1; - // Logs are saved to a file path. + // Logs are saved to the file path specified in the `logsPath` field. PATH = 2; } - // Where logs should be saved. + // If and where logs should be saved. Destination destination = 1; - // The path to which logs are saved when the destination = PATH. This can be a - // local file path on the VM, or under the mount point of a Persistent Disk or - // Filestore, or a Cloud Storage path. + // When `destination` is set to `PATH`, you must set this field to the path + // where you want logs to be saved. This path can point to a local directory + // on the VM or (if congifured) a directory under the mount path of any + // Cloud Storage bucket, network file system (NFS), or writable persistent + // disk that is mounted to the job. For example, if the job has a bucket with + // `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the + // root directory of the `remotePath` of that bucket by setting this field to + // `/mnt/disks/my-bucket/`. string logs_path = 2; - // Optional. Additional settings for Cloud Logging. It will only take effect - // when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + // Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally + // set this field to configure additional settings for Cloud Logging. CloudLoggingOption cloud_logging_option = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -429,7 +437,8 @@ message AllocationPolicy { // Named the field as 'instance_template' instead of 'template' to avoid // C++ keyword conflict. // - // Batch only supports global instance templates. + // Batch only supports global instance templates from the same project as + // the job. // You can specify the global instance template as a full or partial URL. string instance_template = 2; } diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto index 8a0ee90d878..8ab62c01f9a 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto @@ -113,13 +113,15 @@ message Job { repeated JobNotification notifications = 14; } -// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be -// preserved. +// LogsPolicy describes if and how a job's logs are preserved. Logs include +// information that is automatically written by the Batch service agent and any +// information that you configured the job's runnables to write to the `stdout` +// or `stderr` streams. message LogsPolicy { // `CloudLoggingOption` contains additional settings for Cloud Logging logs // generated by Batch job. message CloudLoggingOption { - // Optional. Set this flag to true to change the [monitored resource + // Optional. Set this field to `true` to change the [monitored resource // type](https://cloud.google.com/monitoring/api/resources) for // Cloud Logging logs generated by this Batch job from // the @@ -133,26 +135,32 @@ message LogsPolicy { // The destination (if any) for logs. enum Destination { - // Logs are not preserved. + // (Default) Logs are not preserved. DESTINATION_UNSPECIFIED = 0; - // Logs are streamed to Cloud Logging. + // Logs are streamed to Cloud Logging. Optionally, you can configure + // additional settings in the `cloudLoggingOption` field. CLOUD_LOGGING = 1; - // Logs are saved to a file path. + // Logs are saved to the file path specified in the `logsPath` field. PATH = 2; } - // Where logs should be saved. + // If and where logs should be saved. Destination destination = 1; - // The path to which logs are saved when the destination = PATH. This can be a - // local file path on the VM, or under the mount point of a Persistent Disk or - // Filestore, or a Cloud Storage path. + // When `destination` is set to `PATH`, you must set this field to the path + // where you want logs to be saved. This path can point to a local directory + // on the VM or (if congifured) a directory under the mount path of any + // Cloud Storage bucket, network file system (NFS), or writable persistent + // disk that is mounted to the job. For example, if the job has a bucket with + // `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the + // root directory of the `remotePath` of that bucket by setting this field to + // `/mnt/disks/my-bucket/`. string logs_path = 2; - // Optional. Additional settings for Cloud Logging. It will only take effect - // when the destination of `LogsPolicy` is set to `CLOUD_LOGGING`. + // Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally + // set this field to configure additional settings for Cloud Logging. CloudLoggingOption cloud_logging_option = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -504,7 +512,8 @@ message AllocationPolicy { // Named the field as 'instance_template' instead of 'template' to avoid // C++ keyword conflict. // - // Batch only supports global instance templates. + // Batch only supports global instance templates from the same project as + // the job. // You can specify the global instance template as a full or partial URL. string instance_template = 2; } From 9f8c0c2d583656d39d6e6ad6a4b206642e647178 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:17:37 -0800 Subject: [PATCH 4/6] feat: [parallelstore] A new enum `DeploymentType` is added (#5863) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: A new enum `DeploymentType` is added feat: A new field `deployment_type` is added to message `.google.cloud.parallelstore.v1beta.Instance` PiperOrigin-RevId: 702831788 Source-Link: https://github.com/googleapis/googleapis/commit/9ea2c56cb70d70f10fd2bef310ac9febe8d42d30 Source-Link: https://github.com/googleapis/googleapis-gen/commit/75e81055a97f04ef53e5b3f4703981f3de8852a2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUvLk93bEJvdC55YW1sIiwiaCI6Ijc1ZTgxMDU1YTk3ZjA0ZWY1M2U1YjNmNDcwMzk4MWYzZGU4ODUyYTIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../parallelstore/v1beta/parallelstore.proto | 19 ++++++ .../protos/protos.d.ts | 13 ++++ .../protos/protos.js | 63 +++++++++++++++++++ .../protos/protos.json | 14 +++++ 4 files changed, 109 insertions(+) diff --git a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto index 841751ef145..27f8251cb6e 100644 --- a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto +++ b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto @@ -190,6 +190,19 @@ enum DirectoryStripeLevel { DIRECTORY_STRIPE_LEVEL_MAX = 3; } +// Represents the deployment type for the instance. +enum DeploymentType { + // Default Deployment Type + // It is equivalent to SCRATCH + DEPLOYMENT_TYPE_UNSPECIFIED = 0; + + // Scratch + SCRATCH = 1; + + // Persistent + PERSISTENT = 2; +} + // A Parallelstore instance. message Instance { option (google.api.resource) = { @@ -307,6 +320,12 @@ message Instance { // number of files. DirectoryStripeLevel directory_stripe_level = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The deployment type of the instance. Allowed values are: + // + // * `SCRATCH`: the instance is a scratch instance. + // * `PERSISTENT`: the instance is a persistent instance. + DeploymentType deployment_type = 17 [(google.api.field_behavior) = OPTIONAL]; } // List instances request. diff --git a/packages/google-cloud-parallelstore/protos/protos.d.ts b/packages/google-cloud-parallelstore/protos/protos.d.ts index 8109648cd45..ec005b1872b 100644 --- a/packages/google-cloud-parallelstore/protos/protos.d.ts +++ b/packages/google-cloud-parallelstore/protos/protos.d.ts @@ -2755,6 +2755,13 @@ export namespace google { DIRECTORY_STRIPE_LEVEL_MAX = 3 } + /** DeploymentType enum. */ + enum DeploymentType { + DEPLOYMENT_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + /** Properties of an Instance. */ interface IInstance { @@ -2799,6 +2806,9 @@ export namespace google { /** Instance directoryStripeLevel */ directoryStripeLevel?: (google.cloud.parallelstore.v1beta.DirectoryStripeLevel|keyof typeof google.cloud.parallelstore.v1beta.DirectoryStripeLevel|null); + + /** Instance deploymentType */ + deploymentType?: (google.cloud.parallelstore.v1beta.DeploymentType|keyof typeof google.cloud.parallelstore.v1beta.DeploymentType|null); } /** Represents an Instance. */ @@ -2852,6 +2862,9 @@ export namespace google { /** Instance directoryStripeLevel. */ public directoryStripeLevel: (google.cloud.parallelstore.v1beta.DirectoryStripeLevel|keyof typeof google.cloud.parallelstore.v1beta.DirectoryStripeLevel); + /** Instance deploymentType. */ + public deploymentType: (google.cloud.parallelstore.v1beta.DeploymentType|keyof typeof google.cloud.parallelstore.v1beta.DeploymentType); + /** * Creates a new Instance instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-parallelstore/protos/protos.js b/packages/google-cloud-parallelstore/protos/protos.js index d3823b7e563..a70fecae130 100644 --- a/packages/google-cloud-parallelstore/protos/protos.js +++ b/packages/google-cloud-parallelstore/protos/protos.js @@ -6744,6 +6744,22 @@ return values; })(); + /** + * DeploymentType enum. + * @name google.cloud.parallelstore.v1beta.DeploymentType + * @enum {number} + * @property {number} DEPLOYMENT_TYPE_UNSPECIFIED=0 DEPLOYMENT_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + v1beta.DeploymentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPLOYMENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); + v1beta.Instance = (function() { /** @@ -6764,6 +6780,7 @@ * @property {string|null} [effectiveReservedIpRange] Instance effectiveReservedIpRange * @property {google.cloud.parallelstore.v1beta.FileStripeLevel|null} [fileStripeLevel] Instance fileStripeLevel * @property {google.cloud.parallelstore.v1beta.DirectoryStripeLevel|null} [directoryStripeLevel] Instance directoryStripeLevel + * @property {google.cloud.parallelstore.v1beta.DeploymentType|null} [deploymentType] Instance deploymentType */ /** @@ -6895,6 +6912,14 @@ */ Instance.prototype.directoryStripeLevel = 0; + /** + * Instance deploymentType. + * @member {google.cloud.parallelstore.v1beta.DeploymentType} deploymentType + * @memberof google.cloud.parallelstore.v1beta.Instance + * @instance + */ + Instance.prototype.deploymentType = 0; + /** * Creates a new Instance instance using the specified properties. * @function create @@ -6949,6 +6974,8 @@ writer.uint32(/* id 15, wireType 0 =*/120).int32(message.fileStripeLevel); if (message.directoryStripeLevel != null && Object.hasOwnProperty.call(message, "directoryStripeLevel")) writer.uint32(/* id 16, wireType 0 =*/128).int32(message.directoryStripeLevel); + if (message.deploymentType != null && Object.hasOwnProperty.call(message, "deploymentType")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.deploymentType); return writer; }; @@ -7060,6 +7087,10 @@ message.directoryStripeLevel = reader.int32(); break; } + case 17: { + message.deploymentType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7173,6 +7204,15 @@ case 3: break; } + if (message.deploymentType != null && message.hasOwnProperty("deploymentType")) + switch (message.deploymentType) { + default: + return "deploymentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -7313,6 +7353,26 @@ message.directoryStripeLevel = 3; break; } + switch (object.deploymentType) { + default: + if (typeof object.deploymentType === "number") { + message.deploymentType = object.deploymentType; + break; + } + break; + case "DEPLOYMENT_TYPE_UNSPECIFIED": + case 0: + message.deploymentType = 0; + break; + case "SCRATCH": + case 1: + message.deploymentType = 1; + break; + case "PERSISTENT": + case 2: + message.deploymentType = 2; + break; + } return message; }; @@ -7350,6 +7410,7 @@ object.effectiveReservedIpRange = ""; object.fileStripeLevel = options.enums === String ? "FILE_STRIPE_LEVEL_UNSPECIFIED" : 0; object.directoryStripeLevel = options.enums === String ? "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED" : 0; + object.deploymentType = options.enums === String ? "DEPLOYMENT_TYPE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -7389,6 +7450,8 @@ object.fileStripeLevel = options.enums === String ? $root.google.cloud.parallelstore.v1beta.FileStripeLevel[message.fileStripeLevel] === undefined ? message.fileStripeLevel : $root.google.cloud.parallelstore.v1beta.FileStripeLevel[message.fileStripeLevel] : message.fileStripeLevel; if (message.directoryStripeLevel != null && message.hasOwnProperty("directoryStripeLevel")) object.directoryStripeLevel = options.enums === String ? $root.google.cloud.parallelstore.v1beta.DirectoryStripeLevel[message.directoryStripeLevel] === undefined ? message.directoryStripeLevel : $root.google.cloud.parallelstore.v1beta.DirectoryStripeLevel[message.directoryStripeLevel] : message.directoryStripeLevel; + if (message.deploymentType != null && message.hasOwnProperty("deploymentType")) + object.deploymentType = options.enums === String ? $root.google.cloud.parallelstore.v1beta.DeploymentType[message.deploymentType] === undefined ? message.deploymentType : $root.google.cloud.parallelstore.v1beta.DeploymentType[message.deploymentType] : message.deploymentType; return object; }; diff --git a/packages/google-cloud-parallelstore/protos/protos.json b/packages/google-cloud-parallelstore/protos/protos.json index 45ef388c148..f6f853f8d93 100644 --- a/packages/google-cloud-parallelstore/protos/protos.json +++ b/packages/google-cloud-parallelstore/protos/protos.json @@ -1104,6 +1104,13 @@ "DIRECTORY_STRIPE_LEVEL_MAX": 3 } }, + "DeploymentType": { + "values": { + "DEPLOYMENT_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 + } + }, "Instance": { "options": { "(google.api.resource).type": "parallelstore.googleapis.com/Instance", @@ -1214,6 +1221,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "deploymentType": { + "type": "DeploymentType", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { From 522c389d50d175c26afcbe513e98824eb9e190e9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:17:51 -0800 Subject: [PATCH 5/6] feat: [dialogflow] properly mark TrainingPhrase name field output-only (#5862) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: properly mark TrainingPhrase name field output-only docs: fixed the references to proto method / fields PiperOrigin-RevId: 702736565 Source-Link: https://github.com/googleapis/googleapis/commit/6989f679896e2318b02d7e6c74b6d65aa2290824 Source-Link: https://github.com/googleapis/googleapis-gen/commit/50364718af0486eaa5c2fa2925414be858d0cf7d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6IjUwMzY0NzE4YWYwNDg2ZWFhNWMyZmEyOTI1NDE0YmU4NThkMGNmN2QifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: d-goog <188102366+d-goog@users.noreply.github.com> --- .../cloud/dialogflow/v2/answer_record.proto | 5 +++-- .../cloud/dialogflow/v2/audio_config.proto | 4 ++-- .../cloud/dialogflow/v2/conversation.proto | 16 +++++++++----- .../dialogflow/v2/conversation_dataset.proto | 4 ++-- .../dialogflow/v2/conversation_profile.proto | 19 +++++++++++----- .../google/cloud/dialogflow/v2/intent.proto | 2 +- .../cloud/dialogflow/v2/participant.proto | 18 ++++++++------- .../google/cloud/dialogflow/v2/session.proto | 22 ++++++++++--------- .../protos/protos.json | 5 ++++- .../participants.streaming_analyze_content.js | 3 ++- ...t_metadata_google.cloud.dialogflow.v2.json | 6 ++--- .../src/v2/conversation_profiles_client.ts | 8 +++++-- 12 files changed, 68 insertions(+), 44 deletions(-) diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto index 73da1490612..97657550e79 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto @@ -93,8 +93,9 @@ service AnswerRecords { // returned to the customers. // 2. The customer uses the // [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the -// [UpdateAnswerRecord][] method to send feedback about a specific answer -// that they believe is wrong. +// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] +// method to send feedback about a specific answer that they believe is +// wrong. message AnswerRecord { option (google.api.resource) = { type: "dialogflow.googleapis.com/AnswerRecord" diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto index 0f58aee2f5c..89e4eb6028c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto @@ -445,8 +445,8 @@ enum SpeechModelVariant { // USE_BEST_AVAILABLE. SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; - // Use the best available variant of the [Speech - // model][InputAudioConfig.model] that the caller is eligible for. + // Use the best available variant of the [Speech model][model] that the caller + // is eligible for. // // Please see the [Dialogflow // docs](https://cloud.google.com/dialogflow/docs/data-logging) for diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto index e6c37a533dd..12c30b1838f 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto @@ -515,9 +515,11 @@ message SuggestConversationSummaryResponse { }]; // Number of messages prior to and including - // [last_conversation_message][] used to compile the suggestion. It may be - // smaller than the [SuggestSummaryRequest.context_size][] field in the - // request if there weren't that many messages in the conversation. + // [latest_message][google.cloud.dialogflow.v2.SuggestConversationSummaryResponse.latest_message] + // used to compile the suggestion. It may be smaller than the + // [SuggestConversationSummaryRequest.context_size][google.cloud.dialogflow.v2.SuggestConversationSummaryRequest.context_size] + // field in the request if there weren't that many messages in the + // conversation. int32 context_size = 3; } @@ -601,9 +603,11 @@ message GenerateStatelessSummaryResponse { }]; // Number of messages prior to and including - // [last_conversation_message][] used to compile the suggestion. It may be - // smaller than the [GenerateStatelessSummaryRequest.context_size][] field in - // the request if there weren't that many messages in the conversation. + // [latest_message][google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.latest_message] + // used to compile the suggestion. It may be smaller than the + // [GenerateStatelessSummaryRequest.max_context_size][google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.max_context_size] + // field in the request if there weren't that many messages in the + // conversation. int32 context_size = 3; } diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto index 759e5490096..e45054630d9 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto @@ -330,7 +330,7 @@ message ImportConversationDataOperationResponse { int32 import_count = 3; } -// Metadata for [ConversationDatasets][CreateConversationDataset]. +// Metadata for [CreateConversationDataset][]. message CreateConversationDatasetOperationMetadata { // The resource name of the conversation dataset that will be created. Format: // `projects//locations//locations//locations/ Date: Mon, 9 Dec 2024 14:19:49 -0800 Subject: [PATCH 6/6] docs: Update io.proto to use markdown headings instead of HTML, remove some unused HTML from markdown (#5866) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Update io.proto to use markdown headings instead of HTML, remove some unused HTML from markdown PiperOrigin-RevId: 703192272 Source-Link: https://github.com/googleapis/googleapis/commit/05347e0a68ac16ec35146249d598fcdc6dd8c0c5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/71b95495d6fb29d970ead6a17752d58d1efc8ffb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWF1dG9tbC8uT3dsQm90LnlhbWwiLCJoIjoiNzFiOTU0OTVkNmZiMjlkOTcwZWFkNmExNzc1MmQ1OGQxZWZjOGZmYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-automl/README.md | 4 +- .../protos/google/cloud/automl/v1/io.proto | 86 ++++++++----------- .../google-cloud-automl/protos/protos.json | 3 + 3 files changed, 42 insertions(+), 51 deletions(-) diff --git a/packages/google-cloud-automl/README.md b/packages/google-cloud-automl/README.md index 37022ee4dd8..1473a0572a5 100644 --- a/packages/google-cloud-automl/README.md +++ b/packages/google-cloud-automl/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud AutoML API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -250,4 +250,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=automl.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-automl/protos/google/cloud/automl/v1/io.proto b/packages/google-cloud-automl/protos/google/cloud/automl/v1/io.proto index 8018851f9c5..77d5d36922a 100644 --- a/packages/google-cloud-automl/protos/google/cloud/automl/v1/io.proto +++ b/packages/google-cloud-automl/protos/google/cloud/automl/v1/io.proto @@ -25,7 +25,8 @@ option java_package = "com.google.cloud.automl.v1"; option php_namespace = "Google\\Cloud\\AutoMl\\V1"; option ruby_package = "Google::Cloud::AutoML::V1"; -// Input configuration for [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] action. +// Input configuration for +// [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] action. // // The format of input depends on dataset_metadata the Dataset into which // the import is happening has. As input source the @@ -41,10 +42,10 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // The formats are represented in EBNF with commas being literal and with // non-terminal symbols defined near the end of this comment. The formats are: // -//

AutoML Vision

+// #### AutoML Vision // // -//
Classification
+// ##### Classification // // See [Preparing your training // data](https://cloud.google.com/vision/automl/docs/prepare) for more @@ -81,7 +82,7 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // UNASSIGNED,gs://folder/image4.jpg // // -//
Object Detection
+// ##### Object Detection // See [Preparing your training // data](https://cloud.google.com/vision/automl/object-detection/docs/prepare) // for more information. @@ -123,10 +124,10 @@ option ruby_package = "Google::Cloud::AutoML::V1"; //
// // -//

AutoML Video Intelligence

+// #### AutoML Video Intelligence // // -//
Classification
+// ##### Classification // // See [Preparing your training // data](https://cloud.google.com/video-intelligence/automl/docs/prepare) for @@ -169,7 +170,7 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // // // -//
Object Tracking
+// ##### Object Tracking // // See [Preparing your training // data](/video-intelligence/automl/object-tracking/docs/prepare) for more @@ -220,14 +221,12 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, // gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, // gs://folder/video2.avi,,,,,,,,,,, -//
-//
// // -//

AutoML Natural Language

+// #### AutoML Natural Language // // -//
Entity Extraction
+// ##### Entity Extraction // // See [Preparing your training // data](/natural-language/automl/entity-analysis/docs/prepare) for more @@ -410,7 +409,7 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // // // -//
Classification
+// ##### Classification // // See [Preparing your training // data](https://cloud.google.com/natural-language/automl/docs/prepare) for more @@ -457,7 +456,7 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // // // -//
Sentiment Analysis
+// ##### Sentiment Analysis // // See [Preparing your training // data](https://cloud.google.com/natural-language/automl/docs/prepare) for more @@ -514,13 +513,10 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // gs://folder/content.txt,3 // TEST,gs://folder/document.pdf // VALIDATE,gs://folder/text_files.zip,2 -//
-//
// // // -//

AutoML Tables

+// #### AutoML Tables // // See [Preparing your training // data](https://cloud.google.com/automl-tables/docs/prepare) for more @@ -559,8 +555,6 @@ option ruby_package = "Google::Cloud::AutoML::V1"; // and between 1000 and 100,000,000 rows, inclusive. There are at most 5 // import data running in parallel. // -//
-//
// // // **Input field definitions:** @@ -641,8 +635,9 @@ message InputConfig { // The source of the input. oneof source { // The Google Cloud Storage location for the input content. - // For [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData], `gcs_source` points to a CSV file with - // a structure described in [InputConfig][google.cloud.automl.v1.InputConfig]. + // For [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData], + // `gcs_source` points to a CSV file with a structure described in + // [InputConfig][google.cloud.automl.v1.InputConfig]. GcsSource gcs_source = 1; } @@ -650,7 +645,7 @@ message InputConfig { // imported data, any string must be up to 25000 // characters long. // - //

AutoML Tables

+ // #### AutoML Tables // // `schema_inference_version` // : (integer) This value must be supplied. @@ -671,8 +666,8 @@ message InputConfig { // non-terminal symbols defined near the end of this comment. The formats // are: // -//

AutoML Vision

-//
Classification
+// #### AutoML Vision +// ##### Classification // // One or more CSV files where each line is a single column: // @@ -688,7 +683,7 @@ message InputConfig { // gs://folder/image2.gif // gs://folder/image3.png // -//
Object Detection
+// ##### Object Detection // // One or more CSV files where each line is a single column: // @@ -703,11 +698,9 @@ message InputConfig { // gs://folder/image1.jpeg // gs://folder/image2.gif // gs://folder/image3.png -//
-//
// -//

AutoML Video Intelligence

-//
Classification
+// #### AutoML Video Intelligence +// ##### Classification // // One or more CSV files where each line is a single column: // @@ -726,7 +719,7 @@ message InputConfig { // gs://folder/video1.mp4,20,60 // gs://folder/vid2.mov,0,inf // -//
Object Tracking
+// ##### Object Tracking // // One or more CSV files where each line is a single column: // @@ -744,11 +737,9 @@ message InputConfig { // gs://folder/video1.mp4,10,40 // gs://folder/video1.mp4,20,60 // gs://folder/vid2.mov,0,inf -//
-//
// -//

AutoML Natural Language

-//
Classification
+// #### AutoML Natural Language +// ##### Classification // // One or more CSV files where each line is a single column: // @@ -765,7 +756,7 @@ message InputConfig { // gs://folder/text2.pdf // gs://folder/text3.tif // -//
Sentiment Analysis
+// ##### Sentiment Analysis // One or more CSV files where each line is a single column: // // GCS_FILE_PATH @@ -781,7 +772,7 @@ message InputConfig { // gs://folder/text2.pdf // gs://folder/text3.tif // -//
Entity Extraction
+// ##### Entity Extraction // // One or more JSONL (JSON Lines) files that either provide inline text or // documents. You can only use one format, either inline text or documents, @@ -851,11 +842,8 @@ message InputConfig { // } // } // } -//
-//
// -//

AutoML Tables

+// #### AutoML Tables // // See [Preparing your training // data](https://cloud.google.com/automl-tables/docs/predict-batch) for more @@ -901,8 +889,6 @@ message InputConfig { // input feature column specs must contain values compatible with the // column spec's data types. Prediction on all the rows of the table // will be attempted. -//
-//
// // **Input field definitions:** // @@ -984,9 +970,10 @@ message DocumentInputConfig { message OutputConfig { // The destination of the output. oneof destination { - // Required. The Google Cloud Storage location where the output is to be written to. - // For Image Object Detection, Text Extraction, Video Classification and - // Tables, in the given directory a new directory will be created with name: + // Required. The Google Cloud Storage location where the output is to be + // written to. For Image Object Detection, Text Extraction, Video + // Classification and Tables, in the given directory a new directory will be + // created with name: // export_data-- where // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export // output will be written into that directory. @@ -1246,8 +1233,8 @@ message OutputConfig { message BatchPredictOutputConfig { // The destination of the output. oneof destination { - // Required. The Google Cloud Storage location of the directory where the output is to - // be written to. + // Required. The Google Cloud Storage location of the directory where the + // output is to be written to. GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; } } @@ -1256,8 +1243,9 @@ message BatchPredictOutputConfig { message ModelExportOutputConfig { // The destination of the output. oneof destination { - // Required. The Google Cloud Storage location where the model is to be written to. - // This location may only be set for the following model formats: + // Required. The Google Cloud Storage location where the model is to be + // written to. This location may only be set for the following model + // formats: // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". // // Under the directory given as the destination a new one with name diff --git a/packages/google-cloud-automl/protos/protos.json b/packages/google-cloud-automl/protos/protos.json index 34de0fd8065..50cae48e4f8 100644 --- a/packages/google-cloud-automl/protos/protos.json +++ b/packages/google-cloud-automl/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": {