diff --git a/packages/google-maps-mapsplatformdatasets/README.md b/packages/google-maps-mapsplatformdatasets/README.md
index f8e272e70c1..7824a7d70ff 100644
--- a/packages/google-maps-mapsplatformdatasets/README.md
+++ b/packages/google-maps-mapsplatformdatasets/README.md
@@ -2,7 +2,7 @@
[//]: # "To regenerate it, use `python -m synthtool`."
-# [Maps Platform Datasets API: Node.js Client](https://github.com/googleapis/google-cloud-node)
+# [Maps Platform Datasets API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-mapsplatformdatasets)
[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@googlemaps/maps-platform-datasets.svg)](https://www.npmjs.org/package/@googlemaps/maps-platform-datasets)
@@ -110,19 +110,23 @@ callListDataset();
## Samples
-Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-mapsplatformdatasets/samples) directory. Each sample's `README.md` has instructions for running its sample.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
-| Maps_platform_datasets_v1_alpha.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.create_dataset.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.delete_dataset_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset_version.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.get_dataset.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.list_dataset_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_dataset_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_dataset_versions.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_datasets.js,samples/README.md) |
-| Maps_platform_datasets_v1_alpha.update_dataset_metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.update_dataset_metadata.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.update_dataset_metadata.js,samples/README.md) |
-| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/quickstart.js,samples/README.md) |
-| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js,samples/README.md) |
+| Maps_platform_datasets.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets.update_dataset_metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.create_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.delete_dataset_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.delete_dataset_version.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.get_dataset.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.list_dataset_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_dataset_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_dataset_versions.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.list_datasets.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Maps_platform_datasets_v1_alpha.update_dataset_metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.update_dataset_metadata.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.update_dataset_metadata.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/quickstart.js,packages/google-maps-mapsplatformdatasets/samples/README.md) |
diff --git a/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/data_source.proto b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/data_source.proto
new file mode 100644
index 00000000000..fc92a0c83a0
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/data_source.proto
@@ -0,0 +1,59 @@
+// Copyright 2023 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.mapsplatformdatasets.v1;
+
+option csharp_namespace = "Google.Maps.MapsPlatformDatasets.V1";
+option go_package = "cloud.google.com/go/maps/mapsplatformdatasets/apiv1/mapsplatformdatasetspb;mapsplatformdatasetspb";
+option java_multiple_files = true;
+option java_outer_classname = "DataSourceProto";
+option java_package = "com.google.maps.mapsplatformdatasets.v1";
+option objc_class_prefix = "MDV1";
+option php_namespace = "Google\\Maps\\MapsPlatformDatasets\\V1";
+
+// The details about the data source when it is a local file.
+message LocalFileSource {
+ // The file name of the uploaded file.
+ string filename = 1;
+
+ // The format of the file that is being uploaded.
+ FileFormat file_format = 2;
+}
+
+// The details about the data source when it is in Google Cloud Storage.
+message GcsSource {
+ // Source data URI. For example, `gs://my_bucket/my_object`.
+ string input_uri = 1;
+
+ // The file format of the Google Cloud Storage object. This is used mainly for
+ // validation.
+ FileFormat file_format = 2;
+}
+
+// The format of the file being uploaded.
+enum FileFormat {
+ // Unspecified file format.
+ FILE_FORMAT_UNSPECIFIED = 0;
+
+ // GeoJson file.
+ FILE_FORMAT_GEOJSON = 1;
+
+ // KML file.
+ FILE_FORMAT_KML = 2;
+
+ // CSV file.
+ FILE_FORMAT_CSV = 3;
+}
diff --git a/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/dataset.proto b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/dataset.proto
new file mode 100644
index 00000000000..0c9bda17822
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/dataset.proto
@@ -0,0 +1,146 @@
+// Copyright 2023 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.mapsplatformdatasets.v1;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/maps/mapsplatformdatasets/v1/data_source.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Maps.MapsPlatformDatasets.V1";
+option go_package = "cloud.google.com/go/maps/mapsplatformdatasets/apiv1/mapsplatformdatasetspb;mapsplatformdatasetspb";
+option java_multiple_files = true;
+option java_outer_classname = "DatasetProto";
+option java_package = "com.google.maps.mapsplatformdatasets.v1";
+option objc_class_prefix = "MDV1";
+option php_namespace = "Google\\Maps\\MapsPlatformDatasets\\V1";
+
+// A representation of a Maps Dataset resource.
+message Dataset {
+ option (google.api.resource) = {
+ type: "mapsplatformdatasets.googleapis.com/Dataset"
+ pattern: "projects/{project}/datasets/{dataset}"
+ };
+
+ // Resource name,
+ // projects/{project}/datasets/{dataset_id}
+ string name = 1;
+
+ // Human readable name, shown in the console UI .
+ string display_name = 2;
+
+ // A description of this dataset .
+ string description = 3;
+
+ // The version ID of the dataset.
+ string version_id = 4;
+
+ // Specified use case for this dataset.
+ repeated Usage usage = 5;
+
+ // Details about the source of the data for the dataset.
+ oneof data_source {
+ // A local file source for the dataset for a single upload.
+ LocalFileSource local_file_source = 6;
+
+ // A Google Cloud Storage file source for the dataset for a single upload.
+ GcsSource gcs_source = 7;
+ }
+
+ // Output only. The status of this dataset version.
+ Status status = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Time when the dataset was first created.
+ google.protobuf.Timestamp create_time = 8
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Time when the dataset metadata was last updated.
+ google.protobuf.Timestamp update_time = 9
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Time when the data was uploaded.
+ google.protobuf.Timestamp version_create_time = 10
+ [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. The description for this version of dataset. It is provided
+ // when importing data to the dataset.
+ string version_description = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// Status of the dataset.
+message Status {
+ // A list of states for the dataset.
+ enum State {
+ // The state of this dataset is not set.
+ STATE_UNSPECIFIED = 0;
+
+ // Data is being imported to a dataset.
+ STATE_IMPORTING = 1;
+
+ // Importing data to a dataset succeeded.
+ STATE_IMPORT_SUCCEEDED = 2;
+
+ // Importing data to a dataset failed.
+ STATE_IMPORT_FAILED = 3;
+
+ // The dataset is in the process of getting deleted.
+ STATE_DELETING = 4;
+
+ // The deletion failed state. This state represents that dataset deletion
+ // has failed. Deletion may be retried.
+ STATE_DELETION_FAILED = 5;
+
+ // Data is being processed.
+ STATE_PROCESSING = 6;
+
+ // The processing failed state. This state represents that processing has
+ // failed and may report errors.
+ STATE_PROCESSING_FAILED = 7;
+
+ // This state is currently not used.
+ STATE_NEEDS_REVIEW = 8;
+
+ // The publishing state. This state represents the publishing is in
+ // progress.
+ STATE_PUBLISHING = 9;
+
+ // The publishing failed states. This state represents that the
+ // publishing failed. Publishing may be retried.
+ STATE_PUBLISHING_FAILED = 10;
+
+ // The completed state. This state represents the dataset being
+ // available for its specific usage.
+ STATE_COMPLETED = 11;
+ }
+
+ // State enum for status.
+ State state = 1;
+
+ // Error message indicating reason of failure. It is empty if the datasets is
+ // not in a failed state.
+ string error_message = 2;
+}
+
+// Usage specifies where the data is intended to be used to inform how to
+// process the data.
+enum Usage {
+ // The usage of this dataset is not set.
+ USAGE_UNSPECIFIED = 0;
+
+ // This dataset will be used for data driven styling.
+ USAGE_DATA_DRIVEN_STYLING = 1;
+}
diff --git a/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets.proto b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets.proto
new file mode 100644
index 00000000000..4202decb0c2
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets.proto
@@ -0,0 +1,111 @@
+// Copyright 2023 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.mapsplatformdatasets.v1;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/maps/mapsplatformdatasets/v1/data_source.proto";
+import "google/maps/mapsplatformdatasets/v1/dataset.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Maps.MapsPlatformDatasets.V1";
+option go_package = "cloud.google.com/go/maps/mapsplatformdatasets/apiv1/mapsplatformdatasetspb;mapsplatformdatasetspb";
+option java_multiple_files = true;
+option java_outer_classname = "MapsPlatformDatasetsProto";
+option java_package = "com.google.maps.mapsplatformdatasets.v1";
+option objc_class_prefix = "MDV1";
+option php_namespace = "Google\\Maps\\MapsPlatformDatasets\\V1";
+
+// Request to create a maps dataset.
+message CreateDatasetRequest {
+ // Required. Parent project that will own the dataset.
+ // Format: projects/{$project}
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Required. The dataset version to create.
+ Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request to update the metadata fields of the dataset.
+message UpdateDatasetMetadataRequest {
+ // Required. The dataset to update. The dataset's name is used to identify the
+ // dataset to be updated. The name has the format:
+ // projects/{project}/datasets/{dataset_id}
+ Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to be updated. Support the value "*" for full
+ // replacement.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// Request to get the specified dataset.
+message GetDatasetRequest {
+ // Required. Resource name. projects/{project}/datasets/{dataset_id}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "mapsplatformdatasets.googleapis.com/Dataset"
+ }
+ ];
+}
+
+// Request to list datasets for the project.
+message ListDatasetsRequest {
+ // Required. The name of the project to list all the datasets for.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // The maximum number of versions to return per page.
+ // If unspecified (or zero), all datasets will be returned.
+ int32 page_size = 2;
+
+ // The page token, received from a previous ListDatasets call.
+ // Provide this to retrieve the subsequent page.
+ string page_token = 3;
+}
+
+// Response to list datasets for the project.
+message ListDatasetsResponse {
+ // All the datasets for the project.
+ repeated Dataset datasets = 1;
+
+ // A token that can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+// Request to delete a dataset.
+//
+// The dataset to be deleted.
+message DeleteDatasetRequest {
+ // Required. Format: projects/${project}/datasets/{dataset_id}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "mapsplatformdatasets.googleapis.com/Dataset"
+ }
+ ];
+}
diff --git a/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets_service.proto b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets_service.proto
new file mode 100644
index 00000000000..1ae92a7c4b4
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets_service.proto
@@ -0,0 +1,81 @@
+// Copyright 2023 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.mapsplatformdatasets.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/maps/mapsplatformdatasets/v1/dataset.proto";
+import "google/maps/mapsplatformdatasets/v1/maps_platform_datasets.proto";
+import "google/protobuf/empty.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.MapsPlatformDatasets.V1";
+option go_package = "cloud.google.com/go/maps/mapsplatformdatasets/apiv1/mapsplatformdatasetspb;mapsplatformdatasetspb";
+option java_multiple_files = true;
+option java_outer_classname = "MapsPlatformDatasetsServiceProto";
+option java_package = "com.google.maps.mapsplatformdatasets.v1";
+option objc_class_prefix = "MDV1";
+option php_namespace = "Google\\Maps\\MapsPlatformDatasets\\V1";
+
+// Service definition for the Maps Platform Datasets API.
+service MapsPlatformDatasets {
+ option (google.api.default_host) = "mapsplatformdatasets.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Create a new dataset for the specified project.
+ rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/datasets"
+ body: "dataset"
+ };
+ option (google.api.method_signature) = "parent,dataset";
+ }
+
+ // Update the metadata for the dataset.
+ rpc UpdateDatasetMetadata(UpdateDatasetMetadataRequest) returns (Dataset) {
+ option (google.api.http) = {
+ patch: "/v1/{dataset.name=projects/*/datasets/*}"
+ body: "dataset"
+ };
+ option (google.api.method_signature) = "dataset,update_mask";
+ }
+
+ // Get the dataset.
+ rpc GetDataset(GetDatasetRequest) returns (Dataset) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/datasets/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // List all the datasets for the specified project.
+ rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/datasets"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Delete the specified dataset .
+ rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/datasets/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+}
diff --git a/packages/google-maps-mapsplatformdatasets/protos/protos.d.ts b/packages/google-maps-mapsplatformdatasets/protos/protos.d.ts
index a8c5d211fdc..2a32d4b3ee8 100644
--- a/packages/google-maps-mapsplatformdatasets/protos/protos.d.ts
+++ b/packages/google-maps-mapsplatformdatasets/protos/protos.d.ts
@@ -23,6 +23,1259 @@ export namespace google {
/** Namespace mapsplatformdatasets. */
namespace mapsplatformdatasets {
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Properties of a LocalFileSource. */
+ interface ILocalFileSource {
+
+ /** LocalFileSource filename */
+ filename?: (string|null);
+
+ /** LocalFileSource fileFormat */
+ fileFormat?: (google.maps.mapsplatformdatasets.v1.FileFormat|keyof typeof google.maps.mapsplatformdatasets.v1.FileFormat|null);
+ }
+
+ /** Represents a LocalFileSource. */
+ class LocalFileSource implements ILocalFileSource {
+
+ /**
+ * Constructs a new LocalFileSource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.ILocalFileSource);
+
+ /** LocalFileSource filename. */
+ public filename: string;
+
+ /** LocalFileSource fileFormat. */
+ public fileFormat: (google.maps.mapsplatformdatasets.v1.FileFormat|keyof typeof google.maps.mapsplatformdatasets.v1.FileFormat);
+
+ /**
+ * Creates a new LocalFileSource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns LocalFileSource instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.ILocalFileSource): google.maps.mapsplatformdatasets.v1.LocalFileSource;
+
+ /**
+ * Encodes the specified LocalFileSource message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.LocalFileSource.verify|verify} messages.
+ * @param message LocalFileSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.ILocalFileSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified LocalFileSource message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.LocalFileSource.verify|verify} messages.
+ * @param message LocalFileSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.ILocalFileSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a LocalFileSource message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns LocalFileSource
+ * @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.mapsplatformdatasets.v1.LocalFileSource;
+
+ /**
+ * Decodes a LocalFileSource message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns LocalFileSource
+ * @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.mapsplatformdatasets.v1.LocalFileSource;
+
+ /**
+ * Verifies a LocalFileSource 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 LocalFileSource message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns LocalFileSource
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.LocalFileSource;
+
+ /**
+ * Creates a plain object from a LocalFileSource message. Also converts values to other types if specified.
+ * @param message LocalFileSource
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.LocalFileSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this LocalFileSource to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for LocalFileSource
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GcsSource. */
+ interface IGcsSource {
+
+ /** GcsSource inputUri */
+ inputUri?: (string|null);
+
+ /** GcsSource fileFormat */
+ fileFormat?: (google.maps.mapsplatformdatasets.v1.FileFormat|keyof typeof google.maps.mapsplatformdatasets.v1.FileFormat|null);
+ }
+
+ /** Represents a GcsSource. */
+ class GcsSource implements IGcsSource {
+
+ /**
+ * Constructs a new GcsSource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IGcsSource);
+
+ /** GcsSource inputUri. */
+ public inputUri: string;
+
+ /** GcsSource fileFormat. */
+ public fileFormat: (google.maps.mapsplatformdatasets.v1.FileFormat|keyof typeof google.maps.mapsplatformdatasets.v1.FileFormat);
+
+ /**
+ * Creates a new GcsSource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsSource instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IGcsSource): google.maps.mapsplatformdatasets.v1.GcsSource;
+
+ /**
+ * Encodes the specified GcsSource message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GcsSource.verify|verify} messages.
+ * @param message GcsSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GcsSource.verify|verify} messages.
+ * @param message GcsSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GcsSource message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GcsSource
+ * @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.mapsplatformdatasets.v1.GcsSource;
+
+ /**
+ * Decodes a GcsSource message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GcsSource
+ * @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.mapsplatformdatasets.v1.GcsSource;
+
+ /**
+ * Verifies a GcsSource 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 GcsSource message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GcsSource
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.GcsSource;
+
+ /**
+ * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
+ * @param message GcsSource
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GcsSource to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GcsSource
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** FileFormat enum. */
+ enum FileFormat {
+ FILE_FORMAT_UNSPECIFIED = 0,
+ FILE_FORMAT_GEOJSON = 1,
+ FILE_FORMAT_KML = 2,
+ FILE_FORMAT_CSV = 3
+ }
+
+ /** Properties of a Dataset. */
+ interface IDataset {
+
+ /** Dataset name */
+ name?: (string|null);
+
+ /** Dataset displayName */
+ displayName?: (string|null);
+
+ /** Dataset description */
+ description?: (string|null);
+
+ /** Dataset versionId */
+ versionId?: (string|null);
+
+ /** Dataset usage */
+ usage?: (google.maps.mapsplatformdatasets.v1.Usage[]|null);
+
+ /** Dataset localFileSource */
+ localFileSource?: (google.maps.mapsplatformdatasets.v1.ILocalFileSource|null);
+
+ /** Dataset gcsSource */
+ gcsSource?: (google.maps.mapsplatformdatasets.v1.IGcsSource|null);
+
+ /** Dataset status */
+ status?: (google.maps.mapsplatformdatasets.v1.IStatus|null);
+
+ /** Dataset createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset updateTime */
+ updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset versionCreateTime */
+ versionCreateTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset versionDescription */
+ versionDescription?: (string|null);
+ }
+
+ /** Represents a Dataset. */
+ class Dataset implements IDataset {
+
+ /**
+ * Constructs a new Dataset.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IDataset);
+
+ /** Dataset name. */
+ public name: string;
+
+ /** Dataset displayName. */
+ public displayName: string;
+
+ /** Dataset description. */
+ public description: string;
+
+ /** Dataset versionId. */
+ public versionId: string;
+
+ /** Dataset usage. */
+ public usage: google.maps.mapsplatformdatasets.v1.Usage[];
+
+ /** Dataset localFileSource. */
+ public localFileSource?: (google.maps.mapsplatformdatasets.v1.ILocalFileSource|null);
+
+ /** Dataset gcsSource. */
+ public gcsSource?: (google.maps.mapsplatformdatasets.v1.IGcsSource|null);
+
+ /** Dataset status. */
+ public status?: (google.maps.mapsplatformdatasets.v1.IStatus|null);
+
+ /** Dataset createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset updateTime. */
+ public updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset versionCreateTime. */
+ public versionCreateTime?: (google.protobuf.ITimestamp|null);
+
+ /** Dataset versionDescription. */
+ public versionDescription: string;
+
+ /** Dataset dataSource. */
+ public dataSource?: ("localFileSource"|"gcsSource");
+
+ /**
+ * Creates a new Dataset instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Dataset instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IDataset): google.maps.mapsplatformdatasets.v1.Dataset;
+
+ /**
+ * Encodes the specified Dataset message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Dataset.verify|verify} messages.
+ * @param message Dataset message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Dataset.verify|verify} messages.
+ * @param message Dataset message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IDataset, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Dataset message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Dataset
+ * @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.mapsplatformdatasets.v1.Dataset;
+
+ /**
+ * Decodes a Dataset message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Dataset
+ * @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.mapsplatformdatasets.v1.Dataset;
+
+ /**
+ * Verifies a Dataset 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 Dataset message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Dataset
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.Dataset;
+
+ /**
+ * Creates a plain object from a Dataset message. Also converts values to other types if specified.
+ * @param message Dataset
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.Dataset, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Dataset to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Dataset
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Status. */
+ interface IStatus {
+
+ /** Status state */
+ state?: (google.maps.mapsplatformdatasets.v1.Status.State|keyof typeof google.maps.mapsplatformdatasets.v1.Status.State|null);
+
+ /** Status errorMessage */
+ errorMessage?: (string|null);
+ }
+
+ /** Represents a Status. */
+ class Status implements IStatus {
+
+ /**
+ * Constructs a new Status.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IStatus);
+
+ /** Status state. */
+ public state: (google.maps.mapsplatformdatasets.v1.Status.State|keyof typeof google.maps.mapsplatformdatasets.v1.Status.State);
+
+ /** Status errorMessage. */
+ public errorMessage: string;
+
+ /**
+ * Creates a new Status instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Status instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IStatus): google.maps.mapsplatformdatasets.v1.Status;
+
+ /**
+ * Encodes the specified Status message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Status.verify|verify} messages.
+ * @param message Status message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Status message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Status.verify|verify} messages.
+ * @param message Status message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Status message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Status
+ * @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.mapsplatformdatasets.v1.Status;
+
+ /**
+ * Decodes a Status message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Status
+ * @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.mapsplatformdatasets.v1.Status;
+
+ /**
+ * Verifies a Status 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 Status message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Status
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.Status;
+
+ /**
+ * Creates a plain object from a Status message. Also converts values to other types if specified.
+ * @param message Status
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.Status, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Status to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Status
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Status {
+
+ /** State enum. */
+ enum State {
+ STATE_UNSPECIFIED = 0,
+ STATE_IMPORTING = 1,
+ STATE_IMPORT_SUCCEEDED = 2,
+ STATE_IMPORT_FAILED = 3,
+ STATE_DELETING = 4,
+ STATE_DELETION_FAILED = 5,
+ STATE_PROCESSING = 6,
+ STATE_PROCESSING_FAILED = 7,
+ STATE_NEEDS_REVIEW = 8,
+ STATE_PUBLISHING = 9,
+ STATE_PUBLISHING_FAILED = 10,
+ STATE_COMPLETED = 11
+ }
+ }
+
+ /** Usage enum. */
+ enum Usage {
+ USAGE_UNSPECIFIED = 0,
+ USAGE_DATA_DRIVEN_STYLING = 1
+ }
+
+ /** Properties of a CreateDatasetRequest. */
+ interface ICreateDatasetRequest {
+
+ /** CreateDatasetRequest parent */
+ parent?: (string|null);
+
+ /** CreateDatasetRequest dataset */
+ dataset?: (google.maps.mapsplatformdatasets.v1.IDataset|null);
+ }
+
+ /** Represents a CreateDatasetRequest. */
+ class CreateDatasetRequest implements ICreateDatasetRequest {
+
+ /**
+ * Constructs a new CreateDatasetRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest);
+
+ /** CreateDatasetRequest parent. */
+ public parent: string;
+
+ /** CreateDatasetRequest dataset. */
+ public dataset?: (google.maps.mapsplatformdatasets.v1.IDataset|null);
+
+ /**
+ * Creates a new CreateDatasetRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateDatasetRequest instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest): google.maps.mapsplatformdatasets.v1.CreateDatasetRequest;
+
+ /**
+ * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.CreateDatasetRequest.verify|verify} messages.
+ * @param message CreateDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.CreateDatasetRequest.verify|verify} messages.
+ * @param message CreateDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateDatasetRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateDatasetRequest
+ * @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.mapsplatformdatasets.v1.CreateDatasetRequest;
+
+ /**
+ * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateDatasetRequest
+ * @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.mapsplatformdatasets.v1.CreateDatasetRequest;
+
+ /**
+ * Verifies a CreateDatasetRequest 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 CreateDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateDatasetRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.CreateDatasetRequest;
+
+ /**
+ * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified.
+ * @param message CreateDatasetRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.CreateDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateDatasetRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateDatasetRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateDatasetMetadataRequest. */
+ interface IUpdateDatasetMetadataRequest {
+
+ /** UpdateDatasetMetadataRequest dataset */
+ dataset?: (google.maps.mapsplatformdatasets.v1.IDataset|null);
+
+ /** UpdateDatasetMetadataRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateDatasetMetadataRequest. */
+ class UpdateDatasetMetadataRequest implements IUpdateDatasetMetadataRequest {
+
+ /**
+ * Constructs a new UpdateDatasetMetadataRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest);
+
+ /** UpdateDatasetMetadataRequest dataset. */
+ public dataset?: (google.maps.mapsplatformdatasets.v1.IDataset|null);
+
+ /** UpdateDatasetMetadataRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateDatasetMetadataRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateDatasetMetadataRequest instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest): google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest;
+
+ /**
+ * Encodes the specified UpdateDatasetMetadataRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.verify|verify} messages.
+ * @param message UpdateDatasetMetadataRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateDatasetMetadataRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.verify|verify} messages.
+ * @param message UpdateDatasetMetadataRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateDatasetMetadataRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateDatasetMetadataRequest
+ * @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.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest;
+
+ /**
+ * Decodes an UpdateDatasetMetadataRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateDatasetMetadataRequest
+ * @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.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest;
+
+ /**
+ * Verifies an UpdateDatasetMetadataRequest 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 an UpdateDatasetMetadataRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateDatasetMetadataRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest;
+
+ /**
+ * Creates a plain object from an UpdateDatasetMetadataRequest message. Also converts values to other types if specified.
+ * @param message UpdateDatasetMetadataRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateDatasetMetadataRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateDatasetMetadataRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetDatasetRequest. */
+ interface IGetDatasetRequest {
+
+ /** GetDatasetRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetDatasetRequest. */
+ class GetDatasetRequest implements IGetDatasetRequest {
+
+ /**
+ * Constructs a new GetDatasetRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest);
+
+ /** GetDatasetRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetDatasetRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetDatasetRequest instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest): google.maps.mapsplatformdatasets.v1.GetDatasetRequest;
+
+ /**
+ * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GetDatasetRequest.verify|verify} messages.
+ * @param message GetDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GetDatasetRequest.verify|verify} messages.
+ * @param message GetDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetDatasetRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetDatasetRequest
+ * @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.mapsplatformdatasets.v1.GetDatasetRequest;
+
+ /**
+ * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetDatasetRequest
+ * @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.mapsplatformdatasets.v1.GetDatasetRequest;
+
+ /**
+ * Verifies a GetDatasetRequest 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 GetDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetDatasetRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.GetDatasetRequest;
+
+ /**
+ * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified.
+ * @param message GetDatasetRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.GetDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetDatasetRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetDatasetRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListDatasetsRequest. */
+ interface IListDatasetsRequest {
+
+ /** ListDatasetsRequest parent */
+ parent?: (string|null);
+
+ /** ListDatasetsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListDatasetsRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListDatasetsRequest. */
+ class ListDatasetsRequest implements IListDatasetsRequest {
+
+ /**
+ * Constructs a new ListDatasetsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest);
+
+ /** ListDatasetsRequest parent. */
+ public parent: string;
+
+ /** ListDatasetsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListDatasetsRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListDatasetsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListDatasetsRequest instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest): google.maps.mapsplatformdatasets.v1.ListDatasetsRequest;
+
+ /**
+ * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsRequest.verify|verify} messages.
+ * @param message ListDatasetsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsRequest.verify|verify} messages.
+ * @param message ListDatasetsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListDatasetsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListDatasetsRequest
+ * @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.mapsplatformdatasets.v1.ListDatasetsRequest;
+
+ /**
+ * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListDatasetsRequest
+ * @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.mapsplatformdatasets.v1.ListDatasetsRequest;
+
+ /**
+ * Verifies a ListDatasetsRequest 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 ListDatasetsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListDatasetsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.ListDatasetsRequest;
+
+ /**
+ * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified.
+ * @param message ListDatasetsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.ListDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListDatasetsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListDatasetsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListDatasetsResponse. */
+ interface IListDatasetsResponse {
+
+ /** ListDatasetsResponse datasets */
+ datasets?: (google.maps.mapsplatformdatasets.v1.IDataset[]|null);
+
+ /** ListDatasetsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListDatasetsResponse. */
+ class ListDatasetsResponse implements IListDatasetsResponse {
+
+ /**
+ * Constructs a new ListDatasetsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IListDatasetsResponse);
+
+ /** ListDatasetsResponse datasets. */
+ public datasets: google.maps.mapsplatformdatasets.v1.IDataset[];
+
+ /** ListDatasetsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListDatasetsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListDatasetsResponse instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IListDatasetsResponse): google.maps.mapsplatformdatasets.v1.ListDatasetsResponse;
+
+ /**
+ * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.verify|verify} messages.
+ * @param message ListDatasetsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.verify|verify} messages.
+ * @param message ListDatasetsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IListDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListDatasetsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListDatasetsResponse
+ * @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.mapsplatformdatasets.v1.ListDatasetsResponse;
+
+ /**
+ * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListDatasetsResponse
+ * @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.mapsplatformdatasets.v1.ListDatasetsResponse;
+
+ /**
+ * Verifies a ListDatasetsResponse 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 ListDatasetsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListDatasetsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.ListDatasetsResponse;
+
+ /**
+ * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified.
+ * @param message ListDatasetsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.ListDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListDatasetsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListDatasetsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DeleteDatasetRequest. */
+ interface IDeleteDatasetRequest {
+
+ /** DeleteDatasetRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a DeleteDatasetRequest. */
+ class DeleteDatasetRequest implements IDeleteDatasetRequest {
+
+ /**
+ * Constructs a new DeleteDatasetRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest);
+
+ /** DeleteDatasetRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new DeleteDatasetRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DeleteDatasetRequest instance
+ */
+ public static create(properties?: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest): google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest;
+
+ /**
+ * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest.verify|verify} messages.
+ * @param message DeleteDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest.verify|verify} messages.
+ * @param message DeleteDatasetRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DeleteDatasetRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DeleteDatasetRequest
+ * @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.mapsplatformdatasets.v1.DeleteDatasetRequest;
+
+ /**
+ * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DeleteDatasetRequest
+ * @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.mapsplatformdatasets.v1.DeleteDatasetRequest;
+
+ /**
+ * Verifies a DeleteDatasetRequest 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 DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DeleteDatasetRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest;
+
+ /**
+ * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified.
+ * @param message DeleteDatasetRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DeleteDatasetRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DeleteDatasetRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Represents a MapsPlatformDatasets */
+ class MapsPlatformDatasets extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new MapsPlatformDatasets service.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ */
+ constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
+
+ /**
+ * Creates new MapsPlatformDatasets service using the specified rpc implementation.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ * @returns RPC service. Useful where requests and/or responses are streamed.
+ */
+ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MapsPlatformDatasets;
+
+ /**
+ * Calls CreateDataset.
+ * @param request CreateDatasetRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Dataset
+ */
+ public createDataset(request: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest, callback: google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.CreateDatasetCallback): void;
+
+ /**
+ * Calls CreateDataset.
+ * @param request CreateDatasetRequest message or plain object
+ * @returns Promise
+ */
+ public createDataset(request: google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest): Promise;
+
+ /**
+ * Calls UpdateDatasetMetadata.
+ * @param request UpdateDatasetMetadataRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Dataset
+ */
+ public updateDatasetMetadata(request: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest, callback: google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.UpdateDatasetMetadataCallback): void;
+
+ /**
+ * Calls UpdateDatasetMetadata.
+ * @param request UpdateDatasetMetadataRequest message or plain object
+ * @returns Promise
+ */
+ public updateDatasetMetadata(request: google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest): Promise;
+
+ /**
+ * Calls GetDataset.
+ * @param request GetDatasetRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Dataset
+ */
+ public getDataset(request: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest, callback: google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.GetDatasetCallback): void;
+
+ /**
+ * Calls GetDataset.
+ * @param request GetDatasetRequest message or plain object
+ * @returns Promise
+ */
+ public getDataset(request: google.maps.mapsplatformdatasets.v1.IGetDatasetRequest): Promise;
+
+ /**
+ * Calls ListDatasets.
+ * @param request ListDatasetsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListDatasetsResponse
+ */
+ public listDatasets(request: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest, callback: google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.ListDatasetsCallback): void;
+
+ /**
+ * Calls ListDatasets.
+ * @param request ListDatasetsRequest message or plain object
+ * @returns Promise
+ */
+ public listDatasets(request: google.maps.mapsplatformdatasets.v1.IListDatasetsRequest): Promise;
+
+ /**
+ * Calls DeleteDataset.
+ * @param request DeleteDatasetRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Empty
+ */
+ public deleteDataset(request: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest, callback: google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.DeleteDatasetCallback): void;
+
+ /**
+ * Calls DeleteDataset.
+ * @param request DeleteDatasetRequest message or plain object
+ * @returns Promise
+ */
+ public deleteDataset(request: google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest): Promise;
+ }
+
+ namespace MapsPlatformDatasets {
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|createDataset}.
+ * @param error Error, if any
+ * @param [response] Dataset
+ */
+ type CreateDatasetCallback = (error: (Error|null), response?: google.maps.mapsplatformdatasets.v1.Dataset) => void;
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|updateDatasetMetadata}.
+ * @param error Error, if any
+ * @param [response] Dataset
+ */
+ type UpdateDatasetMetadataCallback = (error: (Error|null), response?: google.maps.mapsplatformdatasets.v1.Dataset) => void;
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|getDataset}.
+ * @param error Error, if any
+ * @param [response] Dataset
+ */
+ type GetDatasetCallback = (error: (Error|null), response?: google.maps.mapsplatformdatasets.v1.Dataset) => void;
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|listDatasets}.
+ * @param error Error, if any
+ * @param [response] ListDatasetsResponse
+ */
+ type ListDatasetsCallback = (error: (Error|null), response?: google.maps.mapsplatformdatasets.v1.ListDatasetsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|deleteDataset}.
+ * @param error Error, if any
+ * @param [response] Empty
+ */
+ type DeleteDatasetCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
+ }
+ }
+
/** Namespace v1alpha. */
namespace v1alpha {
diff --git a/packages/google-maps-mapsplatformdatasets/protos/protos.js b/packages/google-maps-mapsplatformdatasets/protos/protos.js
index a1bcc9b214c..4d1d72c2c74 100644
--- a/packages/google-maps-mapsplatformdatasets/protos/protos.js
+++ b/packages/google-maps-mapsplatformdatasets/protos/protos.js
@@ -57,6 +57,3023 @@
*/
var mapsplatformdatasets = {};
+ mapsplatformdatasets.v1 = (function() {
+
+ /**
+ * Namespace v1.
+ * @memberof google.maps.mapsplatformdatasets
+ * @namespace
+ */
+ var v1 = {};
+
+ v1.LocalFileSource = (function() {
+
+ /**
+ * Properties of a LocalFileSource.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface ILocalFileSource
+ * @property {string|null} [filename] LocalFileSource filename
+ * @property {google.maps.mapsplatformdatasets.v1.FileFormat|null} [fileFormat] LocalFileSource fileFormat
+ */
+
+ /**
+ * Constructs a new LocalFileSource.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a LocalFileSource.
+ * @implements ILocalFileSource
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.ILocalFileSource=} [properties] Properties to set
+ */
+ function LocalFileSource(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]];
+ }
+
+ /**
+ * LocalFileSource filename.
+ * @member {string} filename
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @instance
+ */
+ LocalFileSource.prototype.filename = "";
+
+ /**
+ * LocalFileSource fileFormat.
+ * @member {google.maps.mapsplatformdatasets.v1.FileFormat} fileFormat
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @instance
+ */
+ LocalFileSource.prototype.fileFormat = 0;
+
+ /**
+ * Creates a new LocalFileSource instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ILocalFileSource=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.LocalFileSource} LocalFileSource instance
+ */
+ LocalFileSource.create = function create(properties) {
+ return new LocalFileSource(properties);
+ };
+
+ /**
+ * Encodes the specified LocalFileSource message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.LocalFileSource.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ILocalFileSource} message LocalFileSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LocalFileSource.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.filename != null && Object.hasOwnProperty.call(message, "filename"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.filename);
+ if (message.fileFormat != null && Object.hasOwnProperty.call(message, "fileFormat"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileFormat);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified LocalFileSource message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.LocalFileSource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ILocalFileSource} message LocalFileSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LocalFileSource.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a LocalFileSource message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.LocalFileSource} LocalFileSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LocalFileSource.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.mapsplatformdatasets.v1.LocalFileSource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.filename = reader.string();
+ break;
+ }
+ case 2: {
+ message.fileFormat = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a LocalFileSource message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.LocalFileSource} LocalFileSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LocalFileSource.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a LocalFileSource message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ LocalFileSource.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.filename != null && message.hasOwnProperty("filename"))
+ if (!$util.isString(message.filename))
+ return "filename: string expected";
+ if (message.fileFormat != null && message.hasOwnProperty("fileFormat"))
+ switch (message.fileFormat) {
+ default:
+ return "fileFormat: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a LocalFileSource message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.LocalFileSource} LocalFileSource
+ */
+ LocalFileSource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.LocalFileSource)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.LocalFileSource();
+ if (object.filename != null)
+ message.filename = String(object.filename);
+ switch (object.fileFormat) {
+ default:
+ if (typeof object.fileFormat === "number") {
+ message.fileFormat = object.fileFormat;
+ break;
+ }
+ break;
+ case "FILE_FORMAT_UNSPECIFIED":
+ case 0:
+ message.fileFormat = 0;
+ break;
+ case "FILE_FORMAT_GEOJSON":
+ case 1:
+ message.fileFormat = 1;
+ break;
+ case "FILE_FORMAT_KML":
+ case 2:
+ message.fileFormat = 2;
+ break;
+ case "FILE_FORMAT_CSV":
+ case 3:
+ message.fileFormat = 3;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a LocalFileSource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.LocalFileSource} message LocalFileSource
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ LocalFileSource.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.filename = "";
+ object.fileFormat = options.enums === String ? "FILE_FORMAT_UNSPECIFIED" : 0;
+ }
+ if (message.filename != null && message.hasOwnProperty("filename"))
+ object.filename = message.filename;
+ if (message.fileFormat != null && message.hasOwnProperty("fileFormat"))
+ object.fileFormat = options.enums === String ? $root.google.maps.mapsplatformdatasets.v1.FileFormat[message.fileFormat] === undefined ? message.fileFormat : $root.google.maps.mapsplatformdatasets.v1.FileFormat[message.fileFormat] : message.fileFormat;
+ return object;
+ };
+
+ /**
+ * Converts this LocalFileSource to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ LocalFileSource.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for LocalFileSource
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.LocalFileSource
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ LocalFileSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.LocalFileSource";
+ };
+
+ return LocalFileSource;
+ })();
+
+ v1.GcsSource = (function() {
+
+ /**
+ * Properties of a GcsSource.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IGcsSource
+ * @property {string|null} [inputUri] GcsSource inputUri
+ * @property {google.maps.mapsplatformdatasets.v1.FileFormat|null} [fileFormat] GcsSource fileFormat
+ */
+
+ /**
+ * Constructs a new GcsSource.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a GcsSource.
+ * @implements IGcsSource
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IGcsSource=} [properties] Properties to set
+ */
+ function GcsSource(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]];
+ }
+
+ /**
+ * GcsSource inputUri.
+ * @member {string} inputUri
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @instance
+ */
+ GcsSource.prototype.inputUri = "";
+
+ /**
+ * GcsSource fileFormat.
+ * @member {google.maps.mapsplatformdatasets.v1.FileFormat} fileFormat
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @instance
+ */
+ GcsSource.prototype.fileFormat = 0;
+
+ /**
+ * Creates a new GcsSource instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGcsSource=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.GcsSource} GcsSource instance
+ */
+ GcsSource.create = function create(properties) {
+ return new GcsSource(properties);
+ };
+
+ /**
+ * Encodes the specified GcsSource message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GcsSource.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGcsSource} message GcsSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsSource.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.inputUri != null && Object.hasOwnProperty.call(message, "inputUri"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUri);
+ if (message.fileFormat != null && Object.hasOwnProperty.call(message, "fileFormat"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileFormat);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GcsSource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGcsSource} message GcsSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GcsSource message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.GcsSource} GcsSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsSource.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.mapsplatformdatasets.v1.GcsSource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.inputUri = reader.string();
+ break;
+ }
+ case 2: {
+ message.fileFormat = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GcsSource message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.GcsSource} GcsSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GcsSource.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GcsSource message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GcsSource.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.inputUri != null && message.hasOwnProperty("inputUri"))
+ if (!$util.isString(message.inputUri))
+ return "inputUri: string expected";
+ if (message.fileFormat != null && message.hasOwnProperty("fileFormat"))
+ switch (message.fileFormat) {
+ default:
+ return "fileFormat: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.GcsSource} GcsSource
+ */
+ GcsSource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.GcsSource)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.GcsSource();
+ if (object.inputUri != null)
+ message.inputUri = String(object.inputUri);
+ switch (object.fileFormat) {
+ default:
+ if (typeof object.fileFormat === "number") {
+ message.fileFormat = object.fileFormat;
+ break;
+ }
+ break;
+ case "FILE_FORMAT_UNSPECIFIED":
+ case 0:
+ message.fileFormat = 0;
+ break;
+ case "FILE_FORMAT_GEOJSON":
+ case 1:
+ message.fileFormat = 1;
+ break;
+ case "FILE_FORMAT_KML":
+ case 2:
+ message.fileFormat = 2;
+ break;
+ case "FILE_FORMAT_CSV":
+ case 3:
+ message.fileFormat = 3;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.GcsSource} message GcsSource
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GcsSource.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.inputUri = "";
+ object.fileFormat = options.enums === String ? "FILE_FORMAT_UNSPECIFIED" : 0;
+ }
+ if (message.inputUri != null && message.hasOwnProperty("inputUri"))
+ object.inputUri = message.inputUri;
+ if (message.fileFormat != null && message.hasOwnProperty("fileFormat"))
+ object.fileFormat = options.enums === String ? $root.google.maps.mapsplatformdatasets.v1.FileFormat[message.fileFormat] === undefined ? message.fileFormat : $root.google.maps.mapsplatformdatasets.v1.FileFormat[message.fileFormat] : message.fileFormat;
+ return object;
+ };
+
+ /**
+ * Converts this GcsSource to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GcsSource.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GcsSource
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.GcsSource
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.GcsSource";
+ };
+
+ return GcsSource;
+ })();
+
+ /**
+ * FileFormat enum.
+ * @name google.maps.mapsplatformdatasets.v1.FileFormat
+ * @enum {number}
+ * @property {number} FILE_FORMAT_UNSPECIFIED=0 FILE_FORMAT_UNSPECIFIED value
+ * @property {number} FILE_FORMAT_GEOJSON=1 FILE_FORMAT_GEOJSON value
+ * @property {number} FILE_FORMAT_KML=2 FILE_FORMAT_KML value
+ * @property {number} FILE_FORMAT_CSV=3 FILE_FORMAT_CSV value
+ */
+ v1.FileFormat = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "FILE_FORMAT_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "FILE_FORMAT_GEOJSON"] = 1;
+ values[valuesById[2] = "FILE_FORMAT_KML"] = 2;
+ values[valuesById[3] = "FILE_FORMAT_CSV"] = 3;
+ return values;
+ })();
+
+ v1.Dataset = (function() {
+
+ /**
+ * Properties of a Dataset.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IDataset
+ * @property {string|null} [name] Dataset name
+ * @property {string|null} [displayName] Dataset displayName
+ * @property {string|null} [description] Dataset description
+ * @property {string|null} [versionId] Dataset versionId
+ * @property {Array.|null} [usage] Dataset usage
+ * @property {google.maps.mapsplatformdatasets.v1.ILocalFileSource|null} [localFileSource] Dataset localFileSource
+ * @property {google.maps.mapsplatformdatasets.v1.IGcsSource|null} [gcsSource] Dataset gcsSource
+ * @property {google.maps.mapsplatformdatasets.v1.IStatus|null} [status] Dataset status
+ * @property {google.protobuf.ITimestamp|null} [createTime] Dataset createTime
+ * @property {google.protobuf.ITimestamp|null} [updateTime] Dataset updateTime
+ * @property {google.protobuf.ITimestamp|null} [versionCreateTime] Dataset versionCreateTime
+ * @property {string|null} [versionDescription] Dataset versionDescription
+ */
+
+ /**
+ * Constructs a new Dataset.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a Dataset.
+ * @implements IDataset
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IDataset=} [properties] Properties to set
+ */
+ function Dataset(properties) {
+ this.usage = [];
+ 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]];
+ }
+
+ /**
+ * Dataset name.
+ * @member {string} name
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.name = "";
+
+ /**
+ * Dataset displayName.
+ * @member {string} displayName
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.displayName = "";
+
+ /**
+ * Dataset description.
+ * @member {string} description
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.description = "";
+
+ /**
+ * Dataset versionId.
+ * @member {string} versionId
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.versionId = "";
+
+ /**
+ * Dataset usage.
+ * @member {Array.} usage
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.usage = $util.emptyArray;
+
+ /**
+ * Dataset localFileSource.
+ * @member {google.maps.mapsplatformdatasets.v1.ILocalFileSource|null|undefined} localFileSource
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.localFileSource = null;
+
+ /**
+ * Dataset gcsSource.
+ * @member {google.maps.mapsplatformdatasets.v1.IGcsSource|null|undefined} gcsSource
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.gcsSource = null;
+
+ /**
+ * Dataset status.
+ * @member {google.maps.mapsplatformdatasets.v1.IStatus|null|undefined} status
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.status = null;
+
+ /**
+ * Dataset createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.createTime = null;
+
+ /**
+ * Dataset updateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} updateTime
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.updateTime = null;
+
+ /**
+ * Dataset versionCreateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} versionCreateTime
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.versionCreateTime = null;
+
+ /**
+ * Dataset versionDescription.
+ * @member {string} versionDescription
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Dataset.prototype.versionDescription = "";
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * Dataset dataSource.
+ * @member {"localFileSource"|"gcsSource"|undefined} dataSource
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ */
+ Object.defineProperty(Dataset.prototype, "dataSource", {
+ get: $util.oneOfGetter($oneOfFields = ["localFileSource", "gcsSource"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new Dataset instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDataset=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.Dataset} Dataset instance
+ */
+ Dataset.create = function create(properties) {
+ return new Dataset(properties);
+ };
+
+ /**
+ * Encodes the specified Dataset message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Dataset.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDataset} message Dataset message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Dataset.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
+ if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.versionId);
+ if (message.usage != null && message.usage.length) {
+ writer.uint32(/* id 5, wireType 2 =*/42).fork();
+ for (var i = 0; i < message.usage.length; ++i)
+ writer.int32(message.usage[i]);
+ writer.ldelim();
+ }
+ if (message.localFileSource != null && Object.hasOwnProperty.call(message, "localFileSource"))
+ $root.google.maps.mapsplatformdatasets.v1.LocalFileSource.encode(message.localFileSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
+ $root.google.maps.mapsplatformdatasets.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
+ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
+ if (message.versionCreateTime != null && Object.hasOwnProperty.call(message, "versionCreateTime"))
+ $root.google.protobuf.Timestamp.encode(message.versionCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
+ if (message.versionDescription != null && Object.hasOwnProperty.call(message, "versionDescription"))
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.versionDescription);
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
+ $root.google.maps.mapsplatformdatasets.v1.Status.encode(message.status, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Dataset message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Dataset.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDataset} message Dataset message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Dataset.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Dataset message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.Dataset} Dataset
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Dataset.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.mapsplatformdatasets.v1.Dataset();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.displayName = reader.string();
+ break;
+ }
+ case 3: {
+ message.description = reader.string();
+ break;
+ }
+ case 4: {
+ message.versionId = reader.string();
+ break;
+ }
+ case 5: {
+ if (!(message.usage && message.usage.length))
+ message.usage = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.usage.push(reader.int32());
+ } else
+ message.usage.push(reader.int32());
+ break;
+ }
+ case 6: {
+ message.localFileSource = $root.google.maps.mapsplatformdatasets.v1.LocalFileSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.gcsSource = $root.google.maps.mapsplatformdatasets.v1.GcsSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 12: {
+ message.status = $root.google.maps.mapsplatformdatasets.v1.Status.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 10: {
+ message.versionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 11: {
+ message.versionDescription = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Dataset message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.Dataset} Dataset
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Dataset.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Dataset message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Dataset.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.description != null && message.hasOwnProperty("description"))
+ if (!$util.isString(message.description))
+ return "description: string expected";
+ if (message.versionId != null && message.hasOwnProperty("versionId"))
+ if (!$util.isString(message.versionId))
+ return "versionId: string expected";
+ if (message.usage != null && message.hasOwnProperty("usage")) {
+ if (!Array.isArray(message.usage))
+ return "usage: array expected";
+ for (var i = 0; i < message.usage.length; ++i)
+ switch (message.usage[i]) {
+ default:
+ return "usage: enum value[] expected";
+ case 0:
+ case 1:
+ break;
+ }
+ }
+ if (message.localFileSource != null && message.hasOwnProperty("localFileSource")) {
+ properties.dataSource = 1;
+ {
+ var error = $root.google.maps.mapsplatformdatasets.v1.LocalFileSource.verify(message.localFileSource);
+ if (error)
+ return "localFileSource." + error;
+ }
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ if (properties.dataSource === 1)
+ return "dataSource: multiple values";
+ properties.dataSource = 1;
+ {
+ var error = $root.google.maps.mapsplatformdatasets.v1.GcsSource.verify(message.gcsSource);
+ if (error)
+ return "gcsSource." + error;
+ }
+ }
+ if (message.status != null && message.hasOwnProperty("status")) {
+ var error = $root.google.maps.mapsplatformdatasets.v1.Status.verify(message.status);
+ if (error)
+ return "status." + error;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
+ if (error)
+ return "updateTime." + error;
+ }
+ if (message.versionCreateTime != null && message.hasOwnProperty("versionCreateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.versionCreateTime);
+ if (error)
+ return "versionCreateTime." + error;
+ }
+ if (message.versionDescription != null && message.hasOwnProperty("versionDescription"))
+ if (!$util.isString(message.versionDescription))
+ return "versionDescription: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Dataset message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.Dataset} Dataset
+ */
+ Dataset.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.Dataset)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.Dataset();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.description != null)
+ message.description = String(object.description);
+ if (object.versionId != null)
+ message.versionId = String(object.versionId);
+ if (object.usage) {
+ if (!Array.isArray(object.usage))
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.usage: array expected");
+ message.usage = [];
+ for (var i = 0; i < object.usage.length; ++i)
+ switch (object.usage[i]) {
+ default:
+ if (typeof object.usage[i] === "number") {
+ message.usage[i] = object.usage[i];
+ break;
+ }
+ case "USAGE_UNSPECIFIED":
+ case 0:
+ message.usage[i] = 0;
+ break;
+ case "USAGE_DATA_DRIVEN_STYLING":
+ case 1:
+ message.usage[i] = 1;
+ break;
+ }
+ }
+ if (object.localFileSource != null) {
+ if (typeof object.localFileSource !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.localFileSource: object expected");
+ message.localFileSource = $root.google.maps.mapsplatformdatasets.v1.LocalFileSource.fromObject(object.localFileSource);
+ }
+ if (object.gcsSource != null) {
+ if (typeof object.gcsSource !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.gcsSource: object expected");
+ message.gcsSource = $root.google.maps.mapsplatformdatasets.v1.GcsSource.fromObject(object.gcsSource);
+ }
+ if (object.status != null) {
+ if (typeof object.status !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.status: object expected");
+ message.status = $root.google.maps.mapsplatformdatasets.v1.Status.fromObject(object.status);
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.updateTime != null) {
+ if (typeof object.updateTime !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.updateTime: object expected");
+ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
+ }
+ if (object.versionCreateTime != null) {
+ if (typeof object.versionCreateTime !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.Dataset.versionCreateTime: object expected");
+ message.versionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.versionCreateTime);
+ }
+ if (object.versionDescription != null)
+ message.versionDescription = String(object.versionDescription);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Dataset message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} message Dataset
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Dataset.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.usage = [];
+ if (options.defaults) {
+ object.name = "";
+ object.displayName = "";
+ object.description = "";
+ object.versionId = "";
+ object.createTime = null;
+ object.updateTime = null;
+ object.versionCreateTime = null;
+ object.versionDescription = "";
+ object.status = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.description != null && message.hasOwnProperty("description"))
+ object.description = message.description;
+ if (message.versionId != null && message.hasOwnProperty("versionId"))
+ object.versionId = message.versionId;
+ if (message.usage && message.usage.length) {
+ object.usage = [];
+ for (var j = 0; j < message.usage.length; ++j)
+ object.usage[j] = options.enums === String ? $root.google.maps.mapsplatformdatasets.v1.Usage[message.usage[j]] === undefined ? message.usage[j] : $root.google.maps.mapsplatformdatasets.v1.Usage[message.usage[j]] : message.usage[j];
+ }
+ if (message.localFileSource != null && message.hasOwnProperty("localFileSource")) {
+ object.localFileSource = $root.google.maps.mapsplatformdatasets.v1.LocalFileSource.toObject(message.localFileSource, options);
+ if (options.oneofs)
+ object.dataSource = "localFileSource";
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ object.gcsSource = $root.google.maps.mapsplatformdatasets.v1.GcsSource.toObject(message.gcsSource, options);
+ if (options.oneofs)
+ object.dataSource = "gcsSource";
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.updateTime != null && message.hasOwnProperty("updateTime"))
+ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
+ if (message.versionCreateTime != null && message.hasOwnProperty("versionCreateTime"))
+ object.versionCreateTime = $root.google.protobuf.Timestamp.toObject(message.versionCreateTime, options);
+ if (message.versionDescription != null && message.hasOwnProperty("versionDescription"))
+ object.versionDescription = message.versionDescription;
+ if (message.status != null && message.hasOwnProperty("status"))
+ object.status = $root.google.maps.mapsplatformdatasets.v1.Status.toObject(message.status, options);
+ return object;
+ };
+
+ /**
+ * Converts this Dataset to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Dataset.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Dataset
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.Dataset
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Dataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.Dataset";
+ };
+
+ return Dataset;
+ })();
+
+ v1.Status = (function() {
+
+ /**
+ * Properties of a Status.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IStatus
+ * @property {google.maps.mapsplatformdatasets.v1.Status.State|null} [state] Status state
+ * @property {string|null} [errorMessage] Status errorMessage
+ */
+
+ /**
+ * Constructs a new Status.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a Status.
+ * @implements IStatus
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IStatus=} [properties] Properties to set
+ */
+ function Status(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]];
+ }
+
+ /**
+ * Status state.
+ * @member {google.maps.mapsplatformdatasets.v1.Status.State} state
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @instance
+ */
+ Status.prototype.state = 0;
+
+ /**
+ * Status errorMessage.
+ * @member {string} errorMessage
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @instance
+ */
+ Status.prototype.errorMessage = "";
+
+ /**
+ * Creates a new Status instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IStatus=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.Status} Status instance
+ */
+ Status.create = function create(properties) {
+ return new Status(properties);
+ };
+
+ /**
+ * Encodes the specified Status message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Status.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IStatus} message Status message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Status.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Status message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.Status.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IStatus} message Status message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Status.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Status message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.Status} Status
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Status.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.mapsplatformdatasets.v1.Status();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.state = reader.int32();
+ break;
+ }
+ case 2: {
+ message.errorMessage = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Status message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.Status} Status
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Status.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Status message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Status.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.state != null && message.hasOwnProperty("state"))
+ switch (message.state) {
+ default:
+ return "state: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ break;
+ }
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
+ if (!$util.isString(message.errorMessage))
+ return "errorMessage: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Status message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.Status} Status
+ */
+ Status.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.Status)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.Status();
+ switch (object.state) {
+ default:
+ if (typeof object.state === "number") {
+ message.state = object.state;
+ break;
+ }
+ break;
+ case "STATE_UNSPECIFIED":
+ case 0:
+ message.state = 0;
+ break;
+ case "STATE_IMPORTING":
+ case 1:
+ message.state = 1;
+ break;
+ case "STATE_IMPORT_SUCCEEDED":
+ case 2:
+ message.state = 2;
+ break;
+ case "STATE_IMPORT_FAILED":
+ case 3:
+ message.state = 3;
+ break;
+ case "STATE_DELETING":
+ case 4:
+ message.state = 4;
+ break;
+ case "STATE_DELETION_FAILED":
+ case 5:
+ message.state = 5;
+ break;
+ case "STATE_PROCESSING":
+ case 6:
+ message.state = 6;
+ break;
+ case "STATE_PROCESSING_FAILED":
+ case 7:
+ message.state = 7;
+ break;
+ case "STATE_NEEDS_REVIEW":
+ case 8:
+ message.state = 8;
+ break;
+ case "STATE_PUBLISHING":
+ case 9:
+ message.state = 9;
+ break;
+ case "STATE_PUBLISHING_FAILED":
+ case 10:
+ message.state = 10;
+ break;
+ case "STATE_COMPLETED":
+ case 11:
+ message.state = 11;
+ break;
+ }
+ if (object.errorMessage != null)
+ message.errorMessage = String(object.errorMessage);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Status message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.Status} message Status
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Status.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
+ object.errorMessage = "";
+ }
+ if (message.state != null && message.hasOwnProperty("state"))
+ object.state = options.enums === String ? $root.google.maps.mapsplatformdatasets.v1.Status.State[message.state] === undefined ? message.state : $root.google.maps.mapsplatformdatasets.v1.Status.State[message.state] : message.state;
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
+ object.errorMessage = message.errorMessage;
+ return object;
+ };
+
+ /**
+ * Converts this Status to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Status.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Status
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.Status
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.Status";
+ };
+
+ /**
+ * State enum.
+ * @name google.maps.mapsplatformdatasets.v1.Status.State
+ * @enum {number}
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
+ * @property {number} STATE_IMPORTING=1 STATE_IMPORTING value
+ * @property {number} STATE_IMPORT_SUCCEEDED=2 STATE_IMPORT_SUCCEEDED value
+ * @property {number} STATE_IMPORT_FAILED=3 STATE_IMPORT_FAILED value
+ * @property {number} STATE_DELETING=4 STATE_DELETING value
+ * @property {number} STATE_DELETION_FAILED=5 STATE_DELETION_FAILED value
+ * @property {number} STATE_PROCESSING=6 STATE_PROCESSING value
+ * @property {number} STATE_PROCESSING_FAILED=7 STATE_PROCESSING_FAILED value
+ * @property {number} STATE_NEEDS_REVIEW=8 STATE_NEEDS_REVIEW value
+ * @property {number} STATE_PUBLISHING=9 STATE_PUBLISHING value
+ * @property {number} STATE_PUBLISHING_FAILED=10 STATE_PUBLISHING_FAILED value
+ * @property {number} STATE_COMPLETED=11 STATE_COMPLETED value
+ */
+ Status.State = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "STATE_IMPORTING"] = 1;
+ values[valuesById[2] = "STATE_IMPORT_SUCCEEDED"] = 2;
+ values[valuesById[3] = "STATE_IMPORT_FAILED"] = 3;
+ values[valuesById[4] = "STATE_DELETING"] = 4;
+ values[valuesById[5] = "STATE_DELETION_FAILED"] = 5;
+ values[valuesById[6] = "STATE_PROCESSING"] = 6;
+ values[valuesById[7] = "STATE_PROCESSING_FAILED"] = 7;
+ values[valuesById[8] = "STATE_NEEDS_REVIEW"] = 8;
+ values[valuesById[9] = "STATE_PUBLISHING"] = 9;
+ values[valuesById[10] = "STATE_PUBLISHING_FAILED"] = 10;
+ values[valuesById[11] = "STATE_COMPLETED"] = 11;
+ return values;
+ })();
+
+ return Status;
+ })();
+
+ /**
+ * Usage enum.
+ * @name google.maps.mapsplatformdatasets.v1.Usage
+ * @enum {number}
+ * @property {number} USAGE_UNSPECIFIED=0 USAGE_UNSPECIFIED value
+ * @property {number} USAGE_DATA_DRIVEN_STYLING=1 USAGE_DATA_DRIVEN_STYLING value
+ */
+ v1.Usage = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "USAGE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "USAGE_DATA_DRIVEN_STYLING"] = 1;
+ return values;
+ })();
+
+ v1.CreateDatasetRequest = (function() {
+
+ /**
+ * Properties of a CreateDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface ICreateDatasetRequest
+ * @property {string|null} [parent] CreateDatasetRequest parent
+ * @property {google.maps.mapsplatformdatasets.v1.IDataset|null} [dataset] CreateDatasetRequest dataset
+ */
+
+ /**
+ * Constructs a new CreateDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a CreateDatasetRequest.
+ * @implements ICreateDatasetRequest
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest=} [properties] Properties to set
+ */
+ function CreateDatasetRequest(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]];
+ }
+
+ /**
+ * CreateDatasetRequest parent.
+ * @member {string} parent
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @instance
+ */
+ CreateDatasetRequest.prototype.parent = "";
+
+ /**
+ * CreateDatasetRequest dataset.
+ * @member {google.maps.mapsplatformdatasets.v1.IDataset|null|undefined} dataset
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @instance
+ */
+ CreateDatasetRequest.prototype.dataset = null;
+
+ /**
+ * Creates a new CreateDatasetRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.CreateDatasetRequest} CreateDatasetRequest instance
+ */
+ CreateDatasetRequest.create = function create(properties) {
+ return new CreateDatasetRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.CreateDatasetRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateDatasetRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
+ $root.google.maps.mapsplatformdatasets.v1.Dataset.encode(message.dataset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.CreateDatasetRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest} message CreateDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateDatasetRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.CreateDatasetRequest} CreateDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateDatasetRequest.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.mapsplatformdatasets.v1.CreateDatasetRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateDatasetRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.CreateDatasetRequest} CreateDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateDatasetRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateDatasetRequest message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateDatasetRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.dataset != null && message.hasOwnProperty("dataset")) {
+ var error = $root.google.maps.mapsplatformdatasets.v1.Dataset.verify(message.dataset);
+ if (error)
+ return "dataset." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.CreateDatasetRequest} CreateDatasetRequest
+ */
+ CreateDatasetRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.dataset != null) {
+ if (typeof object.dataset !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.CreateDatasetRequest.dataset: object expected");
+ message.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.fromObject(object.dataset);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateDatasetRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.CreateDatasetRequest} message CreateDatasetRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateDatasetRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.dataset = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.dataset != null && message.hasOwnProperty("dataset"))
+ object.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.toObject(message.dataset, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateDatasetRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateDatasetRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateDatasetRequest
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.CreateDatasetRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.CreateDatasetRequest";
+ };
+
+ return CreateDatasetRequest;
+ })();
+
+ v1.UpdateDatasetMetadataRequest = (function() {
+
+ /**
+ * Properties of an UpdateDatasetMetadataRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IUpdateDatasetMetadataRequest
+ * @property {google.maps.mapsplatformdatasets.v1.IDataset|null} [dataset] UpdateDatasetMetadataRequest dataset
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatasetMetadataRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateDatasetMetadataRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents an UpdateDatasetMetadataRequest.
+ * @implements IUpdateDatasetMetadataRequest
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest=} [properties] Properties to set
+ */
+ function UpdateDatasetMetadataRequest(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]];
+ }
+
+ /**
+ * UpdateDatasetMetadataRequest dataset.
+ * @member {google.maps.mapsplatformdatasets.v1.IDataset|null|undefined} dataset
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @instance
+ */
+ UpdateDatasetMetadataRequest.prototype.dataset = null;
+
+ /**
+ * UpdateDatasetMetadataRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @instance
+ */
+ UpdateDatasetMetadataRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateDatasetMetadataRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest} UpdateDatasetMetadataRequest instance
+ */
+ UpdateDatasetMetadataRequest.create = function create(properties) {
+ return new UpdateDatasetMetadataRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateDatasetMetadataRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest} message UpdateDatasetMetadataRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateDatasetMetadataRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset"))
+ $root.google.maps.mapsplatformdatasets.v1.Dataset.encode(message.dataset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateDatasetMetadataRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest} message UpdateDatasetMetadataRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateDatasetMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateDatasetMetadataRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest} UpdateDatasetMetadataRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateDatasetMetadataRequest.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.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateDatasetMetadataRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest} UpdateDatasetMetadataRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateDatasetMetadataRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateDatasetMetadataRequest message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateDatasetMetadataRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.dataset != null && message.hasOwnProperty("dataset")) {
+ var error = $root.google.maps.mapsplatformdatasets.v1.Dataset.verify(message.dataset);
+ if (error)
+ return "dataset." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateDatasetMetadataRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest} UpdateDatasetMetadataRequest
+ */
+ UpdateDatasetMetadataRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest();
+ if (object.dataset != null) {
+ if (typeof object.dataset !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.dataset: object expected");
+ message.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.fromObject(object.dataset);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateDatasetMetadataRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest} message UpdateDatasetMetadataRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateDatasetMetadataRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.dataset = null;
+ object.updateMask = null;
+ }
+ if (message.dataset != null && message.hasOwnProperty("dataset"))
+ object.dataset = $root.google.maps.mapsplatformdatasets.v1.Dataset.toObject(message.dataset, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateDatasetMetadataRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateDatasetMetadataRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateDatasetMetadataRequest
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateDatasetMetadataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest";
+ };
+
+ return UpdateDatasetMetadataRequest;
+ })();
+
+ v1.GetDatasetRequest = (function() {
+
+ /**
+ * Properties of a GetDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IGetDatasetRequest
+ * @property {string|null} [name] GetDatasetRequest name
+ */
+
+ /**
+ * Constructs a new GetDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a GetDatasetRequest.
+ * @implements IGetDatasetRequest
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest=} [properties] Properties to set
+ */
+ function GetDatasetRequest(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]];
+ }
+
+ /**
+ * GetDatasetRequest name.
+ * @member {string} name
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @instance
+ */
+ GetDatasetRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetDatasetRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.GetDatasetRequest} GetDatasetRequest instance
+ */
+ GetDatasetRequest.create = function create(properties) {
+ return new GetDatasetRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GetDatasetRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetDatasetRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GetDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.GetDatasetRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest} message GetDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetDatasetRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.GetDatasetRequest} GetDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetDatasetRequest.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.mapsplatformdatasets.v1.GetDatasetRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GetDatasetRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.GetDatasetRequest} GetDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetDatasetRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetDatasetRequest message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetDatasetRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a GetDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.GetDatasetRequest} GetDatasetRequest
+ */
+ GetDatasetRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.GetDatasetRequest)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.GetDatasetRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetDatasetRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.GetDatasetRequest} message GetDatasetRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetDatasetRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.name = "";
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ return object;
+ };
+
+ /**
+ * Converts this GetDatasetRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetDatasetRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetDatasetRequest
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.GetDatasetRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.GetDatasetRequest";
+ };
+
+ return GetDatasetRequest;
+ })();
+
+ v1.ListDatasetsRequest = (function() {
+
+ /**
+ * Properties of a ListDatasetsRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IListDatasetsRequest
+ * @property {string|null} [parent] ListDatasetsRequest parent
+ * @property {number|null} [pageSize] ListDatasetsRequest pageSize
+ * @property {string|null} [pageToken] ListDatasetsRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListDatasetsRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a ListDatasetsRequest.
+ * @implements IListDatasetsRequest
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest=} [properties] Properties to set
+ */
+ function ListDatasetsRequest(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]];
+ }
+
+ /**
+ * ListDatasetsRequest parent.
+ * @member {string} parent
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @instance
+ */
+ ListDatasetsRequest.prototype.parent = "";
+
+ /**
+ * ListDatasetsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @instance
+ */
+ ListDatasetsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListDatasetsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @instance
+ */
+ ListDatasetsRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListDatasetsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsRequest} ListDatasetsRequest instance
+ */
+ ListDatasetsRequest.create = function create(properties) {
+ return new ListDatasetsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListDatasetsRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDatasetsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListDatasetsRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest} message ListDatasetsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDatasetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListDatasetsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsRequest} ListDatasetsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDatasetsRequest.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.mapsplatformdatasets.v1.ListDatasetsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListDatasetsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsRequest} ListDatasetsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDatasetsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListDatasetsRequest message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListDatasetsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListDatasetsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsRequest} ListDatasetsRequest
+ */
+ ListDatasetsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListDatasetsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ListDatasetsRequest} message ListDatasetsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListDatasetsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListDatasetsRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListDatasetsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListDatasetsRequest
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListDatasetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.ListDatasetsRequest";
+ };
+
+ return ListDatasetsRequest;
+ })();
+
+ v1.ListDatasetsResponse = (function() {
+
+ /**
+ * Properties of a ListDatasetsResponse.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IListDatasetsResponse
+ * @property {Array.|null} [datasets] ListDatasetsResponse datasets
+ * @property {string|null} [nextPageToken] ListDatasetsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListDatasetsResponse.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a ListDatasetsResponse.
+ * @implements IListDatasetsResponse
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsResponse=} [properties] Properties to set
+ */
+ function ListDatasetsResponse(properties) {
+ this.datasets = [];
+ 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]];
+ }
+
+ /**
+ * ListDatasetsResponse datasets.
+ * @member {Array.} datasets
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @instance
+ */
+ ListDatasetsResponse.prototype.datasets = $util.emptyArray;
+
+ /**
+ * ListDatasetsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @instance
+ */
+ ListDatasetsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListDatasetsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsResponse=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} ListDatasetsResponse instance
+ */
+ ListDatasetsResponse.create = function create(properties) {
+ return new ListDatasetsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListDatasetsResponse message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDatasetsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.datasets != null && message.datasets.length)
+ for (var i = 0; i < message.datasets.length; ++i)
+ $root.google.maps.mapsplatformdatasets.v1.Dataset.encode(message.datasets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListDatasetsResponse message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsResponse} message ListDatasetsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDatasetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListDatasetsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} ListDatasetsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDatasetsResponse.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.mapsplatformdatasets.v1.ListDatasetsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.datasets && message.datasets.length))
+ message.datasets = [];
+ message.datasets.push($root.google.maps.mapsplatformdatasets.v1.Dataset.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListDatasetsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} ListDatasetsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDatasetsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListDatasetsResponse message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListDatasetsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.datasets != null && message.hasOwnProperty("datasets")) {
+ if (!Array.isArray(message.datasets))
+ return "datasets: array expected";
+ for (var i = 0; i < message.datasets.length; ++i) {
+ var error = $root.google.maps.mapsplatformdatasets.v1.Dataset.verify(message.datasets[i]);
+ if (error)
+ return "datasets." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListDatasetsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} ListDatasetsResponse
+ */
+ ListDatasetsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.ListDatasetsResponse)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.ListDatasetsResponse();
+ if (object.datasets) {
+ if (!Array.isArray(object.datasets))
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.datasets: array expected");
+ message.datasets = [];
+ for (var i = 0; i < object.datasets.length; ++i) {
+ if (typeof object.datasets[i] !== "object")
+ throw TypeError(".google.maps.mapsplatformdatasets.v1.ListDatasetsResponse.datasets: object expected");
+ message.datasets[i] = $root.google.maps.mapsplatformdatasets.v1.Dataset.fromObject(object.datasets[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListDatasetsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} message ListDatasetsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListDatasetsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.datasets = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.datasets && message.datasets.length) {
+ object.datasets = [];
+ for (var j = 0; j < message.datasets.length; ++j)
+ object.datasets[j] = $root.google.maps.mapsplatformdatasets.v1.Dataset.toObject(message.datasets[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListDatasetsResponse to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListDatasetsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListDatasetsResponse
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.ListDatasetsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListDatasetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.ListDatasetsResponse";
+ };
+
+ return ListDatasetsResponse;
+ })();
+
+ v1.DeleteDatasetRequest = (function() {
+
+ /**
+ * Properties of a DeleteDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @interface IDeleteDatasetRequest
+ * @property {string|null} [name] DeleteDatasetRequest name
+ */
+
+ /**
+ * Constructs a new DeleteDatasetRequest.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a DeleteDatasetRequest.
+ * @implements IDeleteDatasetRequest
+ * @constructor
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest=} [properties] Properties to set
+ */
+ function DeleteDatasetRequest(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]];
+ }
+
+ /**
+ * DeleteDatasetRequest name.
+ * @member {string} name
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @instance
+ */
+ DeleteDatasetRequest.prototype.name = "";
+
+ /**
+ * Creates a new DeleteDatasetRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest=} [properties] Properties to set
+ * @returns {google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest} DeleteDatasetRequest instance
+ */
+ DeleteDatasetRequest.create = function create(properties) {
+ return new DeleteDatasetRequest(properties);
+ };
+
+ /**
+ * Encodes the specified DeleteDatasetRequest message. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteDatasetRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified DeleteDatasetRequest message, length delimited. Does not implicitly {@link google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest} message DeleteDatasetRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DeleteDatasetRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest} DeleteDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteDatasetRequest.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.mapsplatformdatasets.v1.DeleteDatasetRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a DeleteDatasetRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest} DeleteDatasetRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteDatasetRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DeleteDatasetRequest message.
+ * @function verify
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DeleteDatasetRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a DeleteDatasetRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest} DeleteDatasetRequest
+ */
+ DeleteDatasetRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest)
+ return object;
+ var message = new $root.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DeleteDatasetRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest} message DeleteDatasetRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DeleteDatasetRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.name = "";
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ return object;
+ };
+
+ /**
+ * Converts this DeleteDatasetRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DeleteDatasetRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DeleteDatasetRequest
+ * @function getTypeUrl
+ * @memberof google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DeleteDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest";
+ };
+
+ return DeleteDatasetRequest;
+ })();
+
+ v1.MapsPlatformDatasets = (function() {
+
+ /**
+ * Constructs a new MapsPlatformDatasets service.
+ * @memberof google.maps.mapsplatformdatasets.v1
+ * @classdesc Represents a MapsPlatformDatasets
+ * @extends $protobuf.rpc.Service
+ * @constructor
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
+ */
+ function MapsPlatformDatasets(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (MapsPlatformDatasets.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MapsPlatformDatasets;
+
+ /**
+ * Creates new MapsPlatformDatasets service using the specified rpc implementation.
+ * @function create
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @static
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
+ * @returns {MapsPlatformDatasets} RPC service. Useful where requests and/or responses are streamed.
+ */
+ MapsPlatformDatasets.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|createDataset}.
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @typedef CreateDatasetCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} [response] Dataset
+ */
+
+ /**
+ * Calls CreateDataset.
+ * @function createDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object
+ * @param {google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.CreateDatasetCallback} callback Node-style callback called with the error, if any, and Dataset
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(MapsPlatformDatasets.prototype.createDataset = function createDataset(request, callback) {
+ return this.rpcCall(createDataset, $root.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest, $root.google.maps.mapsplatformdatasets.v1.Dataset, request, callback);
+ }, "name", { value: "CreateDataset" });
+
+ /**
+ * Calls CreateDataset.
+ * @function createDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest} request CreateDatasetRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|updateDatasetMetadata}.
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @typedef UpdateDatasetMetadataCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} [response] Dataset
+ */
+
+ /**
+ * Calls UpdateDatasetMetadata.
+ * @function updateDatasetMetadata
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest} request UpdateDatasetMetadataRequest message or plain object
+ * @param {google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.UpdateDatasetMetadataCallback} callback Node-style callback called with the error, if any, and Dataset
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(MapsPlatformDatasets.prototype.updateDatasetMetadata = function updateDatasetMetadata(request, callback) {
+ return this.rpcCall(updateDatasetMetadata, $root.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest, $root.google.maps.mapsplatformdatasets.v1.Dataset, request, callback);
+ }, "name", { value: "UpdateDatasetMetadata" });
+
+ /**
+ * Calls UpdateDatasetMetadata.
+ * @function updateDatasetMetadata
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest} request UpdateDatasetMetadataRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|getDataset}.
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @typedef GetDatasetCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} [response] Dataset
+ */
+
+ /**
+ * Calls GetDataset.
+ * @function getDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest} request GetDatasetRequest message or plain object
+ * @param {google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.GetDatasetCallback} callback Node-style callback called with the error, if any, and Dataset
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(MapsPlatformDatasets.prototype.getDataset = function getDataset(request, callback) {
+ return this.rpcCall(getDataset, $root.google.maps.mapsplatformdatasets.v1.GetDatasetRequest, $root.google.maps.mapsplatformdatasets.v1.Dataset, request, callback);
+ }, "name", { value: "GetDataset" });
+
+ /**
+ * Calls GetDataset.
+ * @function getDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IGetDatasetRequest} request GetDatasetRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|listDatasets}.
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @typedef ListDatasetsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.mapsplatformdatasets.v1.ListDatasetsResponse} [response] ListDatasetsResponse
+ */
+
+ /**
+ * Calls ListDatasets.
+ * @function listDatasets
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest} request ListDatasetsRequest message or plain object
+ * @param {google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.ListDatasetsCallback} callback Node-style callback called with the error, if any, and ListDatasetsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(MapsPlatformDatasets.prototype.listDatasets = function listDatasets(request, callback) {
+ return this.rpcCall(listDatasets, $root.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest, $root.google.maps.mapsplatformdatasets.v1.ListDatasetsResponse, request, callback);
+ }, "name", { value: "ListDatasets" });
+
+ /**
+ * Calls ListDatasets.
+ * @function listDatasets
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IListDatasetsRequest} request ListDatasetsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets|deleteDataset}.
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @typedef DeleteDatasetCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.protobuf.Empty} [response] Empty
+ */
+
+ /**
+ * Calls DeleteDataset.
+ * @function deleteDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object
+ * @param {google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.DeleteDatasetCallback} callback Node-style callback called with the error, if any, and Empty
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(MapsPlatformDatasets.prototype.deleteDataset = function deleteDataset(request, callback) {
+ return this.rpcCall(deleteDataset, $root.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest, $root.google.protobuf.Empty, request, callback);
+ }, "name", { value: "DeleteDataset" });
+
+ /**
+ * Calls DeleteDataset.
+ * @function deleteDataset
+ * @memberof google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets
+ * @instance
+ * @param {google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest} request DeleteDatasetRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return MapsPlatformDatasets;
+ })();
+
+ return v1;
+ })();
+
mapsplatformdatasets.v1alpha = (function() {
/**
diff --git a/packages/google-maps-mapsplatformdatasets/protos/protos.json b/packages/google-maps-mapsplatformdatasets/protos/protos.json
index 2e9f5e03b52..232218e4e0e 100644
--- a/packages/google-maps-mapsplatformdatasets/protos/protos.json
+++ b/packages/google-maps-mapsplatformdatasets/protos/protos.json
@@ -6,6 +6,361 @@
"nested": {
"mapsplatformdatasets": {
"nested": {
+ "v1": {
+ "options": {
+ "csharp_namespace": "Google.Maps.MapsPlatformDatasets.V1",
+ "go_package": "cloud.google.com/go/maps/mapsplatformdatasets/apiv1/mapsplatformdatasetspb;mapsplatformdatasetspb",
+ "java_multiple_files": true,
+ "java_outer_classname": "MapsPlatformDatasetsServiceProto",
+ "java_package": "com.google.maps.mapsplatformdatasets.v1",
+ "objc_class_prefix": "MDV1",
+ "php_namespace": "Google\\Maps\\MapsPlatformDatasets\\V1",
+ "cc_enable_arenas": true
+ },
+ "nested": {
+ "LocalFileSource": {
+ "fields": {
+ "filename": {
+ "type": "string",
+ "id": 1
+ },
+ "fileFormat": {
+ "type": "FileFormat",
+ "id": 2
+ }
+ }
+ },
+ "GcsSource": {
+ "fields": {
+ "inputUri": {
+ "type": "string",
+ "id": 1
+ },
+ "fileFormat": {
+ "type": "FileFormat",
+ "id": 2
+ }
+ }
+ },
+ "FileFormat": {
+ "values": {
+ "FILE_FORMAT_UNSPECIFIED": 0,
+ "FILE_FORMAT_GEOJSON": 1,
+ "FILE_FORMAT_KML": 2,
+ "FILE_FORMAT_CSV": 3
+ }
+ },
+ "Dataset": {
+ "options": {
+ "(google.api.resource).type": "mapsplatformdatasets.googleapis.com/Dataset",
+ "(google.api.resource).pattern": "projects/{project}/datasets/{dataset}"
+ },
+ "oneofs": {
+ "dataSource": {
+ "oneof": [
+ "localFileSource",
+ "gcsSource"
+ ]
+ }
+ },
+ "fields": {
+ "name": {
+ "type": "string",
+ "id": 1
+ },
+ "displayName": {
+ "type": "string",
+ "id": 2
+ },
+ "description": {
+ "type": "string",
+ "id": 3
+ },
+ "versionId": {
+ "type": "string",
+ "id": 4
+ },
+ "usage": {
+ "rule": "repeated",
+ "type": "Usage",
+ "id": 5
+ },
+ "localFileSource": {
+ "type": "LocalFileSource",
+ "id": 6
+ },
+ "gcsSource": {
+ "type": "GcsSource",
+ "id": 7
+ },
+ "status": {
+ "type": "Status",
+ "id": 12,
+ "options": {
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
+ }
+ },
+ "createTime": {
+ "type": "google.protobuf.Timestamp",
+ "id": 8,
+ "options": {
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
+ }
+ },
+ "updateTime": {
+ "type": "google.protobuf.Timestamp",
+ "id": 9,
+ "options": {
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
+ }
+ },
+ "versionCreateTime": {
+ "type": "google.protobuf.Timestamp",
+ "id": 10,
+ "options": {
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
+ }
+ },
+ "versionDescription": {
+ "type": "string",
+ "id": 11,
+ "options": {
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
+ }
+ }
+ }
+ },
+ "Status": {
+ "fields": {
+ "state": {
+ "type": "State",
+ "id": 1
+ },
+ "errorMessage": {
+ "type": "string",
+ "id": 2
+ }
+ },
+ "nested": {
+ "State": {
+ "values": {
+ "STATE_UNSPECIFIED": 0,
+ "STATE_IMPORTING": 1,
+ "STATE_IMPORT_SUCCEEDED": 2,
+ "STATE_IMPORT_FAILED": 3,
+ "STATE_DELETING": 4,
+ "STATE_DELETION_FAILED": 5,
+ "STATE_PROCESSING": 6,
+ "STATE_PROCESSING_FAILED": 7,
+ "STATE_NEEDS_REVIEW": 8,
+ "STATE_PUBLISHING": 9,
+ "STATE_PUBLISHING_FAILED": 10,
+ "STATE_COMPLETED": 11
+ }
+ }
+ }
+ },
+ "Usage": {
+ "values": {
+ "USAGE_UNSPECIFIED": 0,
+ "USAGE_DATA_DRIVEN_STYLING": 1
+ }
+ },
+ "CreateDatasetRequest": {
+ "fields": {
+ "parent": {
+ "type": "string",
+ "id": 1,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED",
+ "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project"
+ }
+ },
+ "dataset": {
+ "type": "Dataset",
+ "id": 2,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED"
+ }
+ }
+ }
+ },
+ "UpdateDatasetMetadataRequest": {
+ "fields": {
+ "dataset": {
+ "type": "Dataset",
+ "id": 1,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED"
+ }
+ },
+ "updateMask": {
+ "type": "google.protobuf.FieldMask",
+ "id": 2
+ }
+ }
+ },
+ "GetDatasetRequest": {
+ "fields": {
+ "name": {
+ "type": "string",
+ "id": 1,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED",
+ "(google.api.resource_reference).type": "mapsplatformdatasets.googleapis.com/Dataset"
+ }
+ }
+ }
+ },
+ "ListDatasetsRequest": {
+ "fields": {
+ "parent": {
+ "type": "string",
+ "id": 1,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED",
+ "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project"
+ }
+ },
+ "pageSize": {
+ "type": "int32",
+ "id": 2
+ },
+ "pageToken": {
+ "type": "string",
+ "id": 3
+ }
+ }
+ },
+ "ListDatasetsResponse": {
+ "fields": {
+ "datasets": {
+ "rule": "repeated",
+ "type": "Dataset",
+ "id": 1
+ },
+ "nextPageToken": {
+ "type": "string",
+ "id": 2
+ }
+ }
+ },
+ "DeleteDatasetRequest": {
+ "fields": {
+ "name": {
+ "type": "string",
+ "id": 1,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED",
+ "(google.api.resource_reference).type": "mapsplatformdatasets.googleapis.com/Dataset"
+ }
+ }
+ }
+ },
+ "MapsPlatformDatasets": {
+ "options": {
+ "(google.api.default_host)": "mapsplatformdatasets.googleapis.com",
+ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform"
+ },
+ "methods": {
+ "CreateDataset": {
+ "requestType": "CreateDatasetRequest",
+ "responseType": "Dataset",
+ "options": {
+ "(google.api.http).post": "/v1/{parent=projects/*}/datasets",
+ "(google.api.http).body": "dataset",
+ "(google.api.method_signature)": "parent,dataset"
+ },
+ "parsedOptions": [
+ {
+ "(google.api.http)": {
+ "post": "/v1/{parent=projects/*}/datasets",
+ "body": "dataset"
+ }
+ },
+ {
+ "(google.api.method_signature)": "parent,dataset"
+ }
+ ]
+ },
+ "UpdateDatasetMetadata": {
+ "requestType": "UpdateDatasetMetadataRequest",
+ "responseType": "Dataset",
+ "options": {
+ "(google.api.http).patch": "/v1/{dataset.name=projects/*/datasets/*}",
+ "(google.api.http).body": "dataset",
+ "(google.api.method_signature)": "dataset,update_mask"
+ },
+ "parsedOptions": [
+ {
+ "(google.api.http)": {
+ "patch": "/v1/{dataset.name=projects/*/datasets/*}",
+ "body": "dataset"
+ }
+ },
+ {
+ "(google.api.method_signature)": "dataset,update_mask"
+ }
+ ]
+ },
+ "GetDataset": {
+ "requestType": "GetDatasetRequest",
+ "responseType": "Dataset",
+ "options": {
+ "(google.api.http).get": "/v1/{name=projects/*/datasets/*}",
+ "(google.api.method_signature)": "name"
+ },
+ "parsedOptions": [
+ {
+ "(google.api.http)": {
+ "get": "/v1/{name=projects/*/datasets/*}"
+ }
+ },
+ {
+ "(google.api.method_signature)": "name"
+ }
+ ]
+ },
+ "ListDatasets": {
+ "requestType": "ListDatasetsRequest",
+ "responseType": "ListDatasetsResponse",
+ "options": {
+ "(google.api.http).get": "/v1/{parent=projects/*}/datasets",
+ "(google.api.method_signature)": "parent"
+ },
+ "parsedOptions": [
+ {
+ "(google.api.http)": {
+ "get": "/v1/{parent=projects/*}/datasets"
+ }
+ },
+ {
+ "(google.api.method_signature)": "parent"
+ }
+ ]
+ },
+ "DeleteDataset": {
+ "requestType": "DeleteDatasetRequest",
+ "responseType": "google.protobuf.Empty",
+ "options": {
+ "(google.api.http).delete": "/v1/{name=projects/*/datasets/*}",
+ "(google.api.method_signature)": "name"
+ },
+ "parsedOptions": [
+ {
+ "(google.api.http)": {
+ "delete": "/v1/{name=projects/*/datasets/*}"
+ }
+ },
+ {
+ "(google.api.method_signature)": "name"
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
"v1alpha": {
"options": {
"csharp_namespace": "Google.Maps.MapsPlatformDatasets.V1Alpha",
diff --git a/packages/google-maps-mapsplatformdatasets/samples/README.md b/packages/google-maps-mapsplatformdatasets/samples/README.md
index 0a67c9c0e07..8e326879cbb 100644
--- a/packages/google-maps-mapsplatformdatasets/samples/README.md
+++ b/packages/google-maps-mapsplatformdatasets/samples/README.md
@@ -12,6 +12,11 @@
* [Before you begin](#before-you-begin)
* [Samples](#samples)
+ * [Maps_platform_datasets.create_dataset](#maps_platform_datasets.create_dataset)
+ * [Maps_platform_datasets.delete_dataset](#maps_platform_datasets.delete_dataset)
+ * [Maps_platform_datasets.get_dataset](#maps_platform_datasets.get_dataset)
+ * [Maps_platform_datasets.list_datasets](#maps_platform_datasets.list_datasets)
+ * [Maps_platform_datasets.update_dataset_metadata](#maps_platform_datasets.update_dataset_metadata)
* [Maps_platform_datasets_v1_alpha.create_dataset](#maps_platform_datasets_v1_alpha.create_dataset)
* [Maps_platform_datasets_v1_alpha.delete_dataset](#maps_platform_datasets_v1_alpha.delete_dataset)
* [Maps_platform_datasets_v1_alpha.delete_dataset_version](#maps_platform_datasets_v1_alpha.delete_dataset_version)
@@ -20,7 +25,6 @@
* [Maps_platform_datasets_v1_alpha.list_datasets](#maps_platform_datasets_v1_alpha.list_datasets)
* [Maps_platform_datasets_v1_alpha.update_dataset_metadata](#maps_platform_datasets_v1_alpha.update_dataset_metadata)
* [Quickstart](#quickstart)
- * [Quickstart](#quickstart)
## Before you begin
@@ -37,6 +41,91 @@ Before running the samples, make sure you've followed the steps outlined in
+### Maps_platform_datasets.create_dataset
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js,samples/README.md)
+
+__Usage:__
+
+
+`node packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js`
+
+
+-----
+
+
+
+
+### Maps_platform_datasets.delete_dataset
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js,samples/README.md)
+
+__Usage:__
+
+
+`node packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js`
+
+
+-----
+
+
+
+
+### Maps_platform_datasets.get_dataset
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js,samples/README.md)
+
+__Usage:__
+
+
+`node packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js`
+
+
+-----
+
+
+
+
+### Maps_platform_datasets.list_datasets
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js,samples/README.md)
+
+__Usage:__
+
+
+`node packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js`
+
+
+-----
+
+
+
+
+### Maps_platform_datasets.update_dataset_metadata
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js,samples/README.md)
+
+__Usage:__
+
+
+`node packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js`
+
+
+-----
+
+
+
+
### Maps_platform_datasets_v1_alpha.create_dataset
View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/maps_platform_datasets_v1_alpha.create_dataset.js).
@@ -168,23 +257,6 @@ __Usage:__
`node packages/google-maps-mapsplatformdatasets/samples/quickstart.js`
------
-
-
-
-
-### Quickstart
-
-View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js).
-
-[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js,samples/README.md)
-
-__Usage:__
-
-
-`node packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js`
-
-
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js
new file mode 100644
index 00000000000..405dc8815ae
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.create_dataset.js
@@ -0,0 +1,67 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+
+
+'use strict';
+
+function main(parent, dataset) {
+ // [START mapsplatformdatasets_v1_generated_MapsPlatformDatasets_CreateDataset_async]
+ /**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+ /**
+ * Required. Parent project that will own the dataset.
+ * Format: projects/{$project}
+ */
+ // const parent = 'abc123'
+ /**
+ * Required. The dataset version to create.
+ */
+ // const dataset = {}
+
+ // Imports the Mapsplatformdatasets library
+ const {MapsPlatformDatasetsClient} = require('@google-cloud/mapsplatformdatasets').v1;
+
+ // Instantiates a client
+ const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();
+
+ async function callCreateDataset() {
+ // Construct request
+ const request = {
+ parent,
+ dataset,
+ };
+
+ // Run request
+ const response = await mapsplatformdatasetsClient.createDataset(request);
+ console.log(response);
+ }
+
+ callCreateDataset();
+ // [END mapsplatformdatasets_v1_generated_MapsPlatformDatasets_CreateDataset_async]
+}
+
+process.on('unhandledRejection', err => {
+ console.error(err.message);
+ process.exitCode = 1;
+});
+main(...process.argv.slice(2));
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js
new file mode 100644
index 00000000000..675a4cda2f3
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.delete_dataset.js
@@ -0,0 +1,61 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+
+
+'use strict';
+
+function main(name) {
+ // [START mapsplatformdatasets_v1_generated_MapsPlatformDatasets_DeleteDataset_async]
+ /**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+ /**
+ * Required. Format: projects/${project}/datasets/{dataset_id}
+ */
+ // const name = 'abc123'
+
+ // Imports the Mapsplatformdatasets library
+ const {MapsPlatformDatasetsClient} = require('@google-cloud/mapsplatformdatasets').v1;
+
+ // Instantiates a client
+ const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();
+
+ async function callDeleteDataset() {
+ // Construct request
+ const request = {
+ name,
+ };
+
+ // Run request
+ const response = await mapsplatformdatasetsClient.deleteDataset(request);
+ console.log(response);
+ }
+
+ callDeleteDataset();
+ // [END mapsplatformdatasets_v1_generated_MapsPlatformDatasets_DeleteDataset_async]
+}
+
+process.on('unhandledRejection', err => {
+ console.error(err.message);
+ process.exitCode = 1;
+});
+main(...process.argv.slice(2));
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js
new file mode 100644
index 00000000000..c683f41ae3e
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.get_dataset.js
@@ -0,0 +1,61 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+
+
+'use strict';
+
+function main(name) {
+ // [START mapsplatformdatasets_v1_generated_MapsPlatformDatasets_GetDataset_async]
+ /**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+ /**
+ * Required. Resource name. projects/{project}/datasets/{dataset_id}
+ */
+ // const name = 'abc123'
+
+ // Imports the Mapsplatformdatasets library
+ const {MapsPlatformDatasetsClient} = require('@google-cloud/mapsplatformdatasets').v1;
+
+ // Instantiates a client
+ const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();
+
+ async function callGetDataset() {
+ // Construct request
+ const request = {
+ name,
+ };
+
+ // Run request
+ const response = await mapsplatformdatasetsClient.getDataset(request);
+ console.log(response);
+ }
+
+ callGetDataset();
+ // [END mapsplatformdatasets_v1_generated_MapsPlatformDatasets_GetDataset_async]
+}
+
+process.on('unhandledRejection', err => {
+ console.error(err.message);
+ process.exitCode = 1;
+});
+main(...process.argv.slice(2));
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js
new file mode 100644
index 00000000000..5edb73b066a
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.list_datasets.js
@@ -0,0 +1,73 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+
+
+'use strict';
+
+function main(parent) {
+ // [START mapsplatformdatasets_v1_generated_MapsPlatformDatasets_ListDatasets_async]
+ /**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+ /**
+ * Required. The name of the project to list all the datasets for.
+ */
+ // const parent = 'abc123'
+ /**
+ * The maximum number of versions to return per page.
+ * If unspecified (or zero), all datasets will be returned.
+ */
+ // const pageSize = 1234
+ /**
+ * The page token, received from a previous ListDatasets call.
+ * Provide this to retrieve the subsequent page.
+ */
+ // const pageToken = 'abc123'
+
+ // Imports the Mapsplatformdatasets library
+ const {MapsPlatformDatasetsClient} = require('@google-cloud/mapsplatformdatasets').v1;
+
+ // Instantiates a client
+ const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();
+
+ async function callListDatasets() {
+ // Construct request
+ const request = {
+ parent,
+ };
+
+ // Run request
+ const iterable = await mapsplatformdatasetsClient.listDatasetsAsync(request);
+ for await (const response of iterable) {
+ console.log(response);
+ }
+ }
+
+ callListDatasets();
+ // [END mapsplatformdatasets_v1_generated_MapsPlatformDatasets_ListDatasets_async]
+}
+
+process.on('unhandledRejection', err => {
+ console.error(err.message);
+ process.exitCode = 1;
+});
+main(...process.argv.slice(2));
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js
new file mode 100644
index 00000000000..5b914f7e63c
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js
@@ -0,0 +1,68 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+
+
+'use strict';
+
+function main(dataset) {
+ // [START mapsplatformdatasets_v1_generated_MapsPlatformDatasets_UpdateDatasetMetadata_async]
+ /**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+ /**
+ * Required. The dataset to update. The dataset's name is used to identify the
+ * dataset to be updated. The name has the format:
+ * projects/{project}/datasets/{dataset_id}
+ */
+ // const dataset = {}
+ /**
+ * The list of fields to be updated. Support the value "*" for full
+ * replacement.
+ */
+ // const updateMask = {}
+
+ // Imports the Mapsplatformdatasets library
+ const {MapsPlatformDatasetsClient} = require('@google-cloud/mapsplatformdatasets').v1;
+
+ // Instantiates a client
+ const mapsplatformdatasetsClient = new MapsPlatformDatasetsClient();
+
+ async function callUpdateDatasetMetadata() {
+ // Construct request
+ const request = {
+ dataset,
+ };
+
+ // Run request
+ const response = await mapsplatformdatasetsClient.updateDatasetMetadata(request);
+ console.log(response);
+ }
+
+ callUpdateDatasetMetadata();
+ // [END mapsplatformdatasets_v1_generated_MapsPlatformDatasets_UpdateDatasetMetadata_async]
+}
+
+process.on('unhandledRejection', err => {
+ console.error(err.message);
+ process.exitCode = 1;
+});
+main(...process.argv.slice(2));
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json
new file mode 100644
index 00000000000..dea97741d64
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json
@@ -0,0 +1,231 @@
+{
+ "clientLibrary": {
+ "name": "nodejs-mapsplatformdatasets",
+ "version": "0.1.2",
+ "language": "TYPESCRIPT",
+ "apis": [
+ {
+ "id": "google.maps.mapsplatformdatasets.v1",
+ "version": "v1"
+ }
+ ]
+ },
+ "snippets": [
+ {
+ "regionTag": "mapsplatformdatasets_v1_generated_MapsPlatformDatasets_CreateDataset_async",
+ "title": "MapsPlatformDatasets createDataset Sample",
+ "origin": "API_DEFINITION",
+ "description": " Create a new dataset for the specified project.",
+ "canonical": true,
+ "file": "maps_platform_datasets.create_dataset.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 59,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "CreateDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.CreateDataset",
+ "async": true,
+ "parameters": [
+ {
+ "name": "parent",
+ "type": "TYPE_STRING"
+ },
+ {
+ "name": "dataset",
+ "type": ".google.maps.mapsplatformdatasets.v1.Dataset"
+ }
+ ],
+ "resultType": ".google.maps.mapsplatformdatasets.v1.Dataset",
+ "client": {
+ "shortName": "MapsPlatformDatasetsClient",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasetsClient"
+ },
+ "method": {
+ "shortName": "CreateDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.CreateDataset",
+ "service": {
+ "shortName": "MapsPlatformDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets"
+ }
+ }
+ }
+ },
+ {
+ "regionTag": "mapsplatformdatasets_v1_generated_MapsPlatformDatasets_UpdateDatasetMetadata_async",
+ "title": "MapsPlatformDatasets updateDatasetMetadata Sample",
+ "origin": "API_DEFINITION",
+ "description": " Update the metadata for the dataset.",
+ "canonical": true,
+ "file": "maps_platform_datasets.update_dataset_metadata.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 60,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "UpdateDatasetMetadata",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.UpdateDatasetMetadata",
+ "async": true,
+ "parameters": [
+ {
+ "name": "dataset",
+ "type": ".google.maps.mapsplatformdatasets.v1.Dataset"
+ },
+ {
+ "name": "update_mask",
+ "type": ".google.protobuf.FieldMask"
+ }
+ ],
+ "resultType": ".google.maps.mapsplatformdatasets.v1.Dataset",
+ "client": {
+ "shortName": "MapsPlatformDatasetsClient",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasetsClient"
+ },
+ "method": {
+ "shortName": "UpdateDatasetMetadata",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.UpdateDatasetMetadata",
+ "service": {
+ "shortName": "MapsPlatformDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets"
+ }
+ }
+ }
+ },
+ {
+ "regionTag": "mapsplatformdatasets_v1_generated_MapsPlatformDatasets_GetDataset_async",
+ "title": "MapsPlatformDatasets getDataset Sample",
+ "origin": "API_DEFINITION",
+ "description": " Get the dataset.",
+ "canonical": true,
+ "file": "maps_platform_datasets.get_dataset.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 53,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "GetDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.GetDataset",
+ "async": true,
+ "parameters": [
+ {
+ "name": "name",
+ "type": "TYPE_STRING"
+ }
+ ],
+ "resultType": ".google.maps.mapsplatformdatasets.v1.Dataset",
+ "client": {
+ "shortName": "MapsPlatformDatasetsClient",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasetsClient"
+ },
+ "method": {
+ "shortName": "GetDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.GetDataset",
+ "service": {
+ "shortName": "MapsPlatformDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets"
+ }
+ }
+ }
+ },
+ {
+ "regionTag": "mapsplatformdatasets_v1_generated_MapsPlatformDatasets_ListDatasets_async",
+ "title": "MapsPlatformDatasets listDatasets Sample",
+ "origin": "API_DEFINITION",
+ "description": " List all the datasets for the specified project.",
+ "canonical": true,
+ "file": "maps_platform_datasets.list_datasets.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 65,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "ListDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.ListDatasets",
+ "async": true,
+ "parameters": [
+ {
+ "name": "parent",
+ "type": "TYPE_STRING"
+ },
+ {
+ "name": "page_size",
+ "type": "TYPE_INT32"
+ },
+ {
+ "name": "page_token",
+ "type": "TYPE_STRING"
+ }
+ ],
+ "resultType": ".google.maps.mapsplatformdatasets.v1.ListDatasetsResponse",
+ "client": {
+ "shortName": "MapsPlatformDatasetsClient",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasetsClient"
+ },
+ "method": {
+ "shortName": "ListDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.ListDatasets",
+ "service": {
+ "shortName": "MapsPlatformDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets"
+ }
+ }
+ }
+ },
+ {
+ "regionTag": "mapsplatformdatasets_v1_generated_MapsPlatformDatasets_DeleteDataset_async",
+ "title": "MapsPlatformDatasets deleteDataset Sample",
+ "origin": "API_DEFINITION",
+ "description": " Delete the specified dataset .",
+ "canonical": true,
+ "file": "maps_platform_datasets.delete_dataset.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 53,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "DeleteDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.DeleteDataset",
+ "async": true,
+ "parameters": [
+ {
+ "name": "name",
+ "type": "TYPE_STRING"
+ }
+ ],
+ "resultType": ".google.protobuf.Empty",
+ "client": {
+ "shortName": "MapsPlatformDatasetsClient",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasetsClient"
+ },
+ "method": {
+ "shortName": "DeleteDataset",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.DeleteDataset",
+ "service": {
+ "shortName": "MapsPlatformDatasets",
+ "fullName": "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets"
+ }
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json
index 8702d4bf131..ccda06a94f5 100644
--- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json
+++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json
@@ -1,7 +1,7 @@
{
"clientLibrary": {
"name": "nodejs-mapsplatformdatasets",
- "version": "0.1.1",
+ "version": "0.1.2",
"language": "TYPESCRIPT",
"apis": [
{
diff --git a/packages/google-maps-mapsplatformdatasets/src/index.ts b/packages/google-maps-mapsplatformdatasets/src/index.ts
index d0a943d8773..246f24a0a6a 100644
--- a/packages/google-maps-mapsplatformdatasets/src/index.ts
+++ b/packages/google-maps-mapsplatformdatasets/src/index.ts
@@ -16,6 +16,7 @@
// ** https://github.com/googleapis/synthtool **
// ** All changes to this file may be overwritten. **
+import * as v1 from './v1';
import * as v1alpha from './v1alpha';
const MapsPlatformDatasetsV1AlphaClient =
@@ -23,7 +24,7 @@ const MapsPlatformDatasetsV1AlphaClient =
type MapsPlatformDatasetsV1AlphaClient =
v1alpha.MapsPlatformDatasetsV1AlphaClient;
-export {v1alpha, MapsPlatformDatasetsV1AlphaClient};
-export default {v1alpha, MapsPlatformDatasetsV1AlphaClient};
+export {v1, v1alpha, MapsPlatformDatasetsV1AlphaClient};
+export default {v1, v1alpha, MapsPlatformDatasetsV1AlphaClient};
import * as protos from '../protos/protos';
export {protos};
diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/gapic_metadata.json b/packages/google-maps-mapsplatformdatasets/src/v1/gapic_metadata.json
new file mode 100644
index 00000000000..d193c81887d
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/src/v1/gapic_metadata.json
@@ -0,0 +1,77 @@
+{
+ "schema": "1.0",
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
+ "language": "typescript",
+ "protoPackage": "google.maps.mapsplatformdatasets.v1",
+ "libraryPackage": "@google-cloud/mapsplatformdatasets",
+ "services": {
+ "MapsPlatformDatasets": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "MapsPlatformDatasetsClient",
+ "rpcs": {
+ "CreateDataset": {
+ "methods": [
+ "createDataset"
+ ]
+ },
+ "UpdateDatasetMetadata": {
+ "methods": [
+ "updateDatasetMetadata"
+ ]
+ },
+ "GetDataset": {
+ "methods": [
+ "getDataset"
+ ]
+ },
+ "DeleteDataset": {
+ "methods": [
+ "deleteDataset"
+ ]
+ },
+ "ListDatasets": {
+ "methods": [
+ "listDatasets",
+ "listDatasetsStream",
+ "listDatasetsAsync"
+ ]
+ }
+ }
+ },
+ "grpc-fallback": {
+ "libraryClient": "MapsPlatformDatasetsClient",
+ "rpcs": {
+ "CreateDataset": {
+ "methods": [
+ "createDataset"
+ ]
+ },
+ "UpdateDatasetMetadata": {
+ "methods": [
+ "updateDatasetMetadata"
+ ]
+ },
+ "GetDataset": {
+ "methods": [
+ "getDataset"
+ ]
+ },
+ "DeleteDataset": {
+ "methods": [
+ "deleteDataset"
+ ]
+ },
+ "ListDatasets": {
+ "methods": [
+ "listDatasets",
+ "listDatasetsStream",
+ "listDatasetsAsync"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/index.ts b/packages/google-maps-mapsplatformdatasets/src/v1/index.ts
new file mode 100644
index 00000000000..ca0c9566b16
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/src/v1/index.ts
@@ -0,0 +1,19 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+export {MapsPlatformDatasetsClient} from './maps_platform_datasets_client';
diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts
new file mode 100644
index 00000000000..ccdc4143824
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts
@@ -0,0 +1,977 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+/* global window */
+import type * as gax from 'google-gax';
+import type {
+ Callback,
+ CallOptions,
+ Descriptors,
+ ClientOptions,
+ PaginationCallback,
+ GaxCall,
+} from 'google-gax';
+import {Transform} from 'stream';
+import * as protos from '../../protos/protos';
+import jsonProtos = require('../../protos/protos.json');
+/**
+ * Client JSON configuration object, loaded from
+ * `src/v1/maps_platform_datasets_client_config.json`.
+ * This file defines retry strategy and timeouts for all API methods in this library.
+ */
+import * as gapicConfig from './maps_platform_datasets_client_config.json';
+const version = require('../../../package.json').version;
+
+/**
+ * Service definition for the Maps Platform Datasets API.
+ * @class
+ * @memberof v1
+ */
+export class MapsPlatformDatasetsClient {
+ private _terminated = false;
+ private _opts: ClientOptions;
+ private _providedCustomServicePath: boolean;
+ private _gaxModule: typeof gax | typeof gax.fallback;
+ private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
+ private _protos: {};
+ private _defaults: {[method: string]: gax.CallSettings};
+ auth: gax.GoogleAuth;
+ descriptors: Descriptors = {
+ page: {},
+ stream: {},
+ longrunning: {},
+ batching: {},
+ };
+ warn: (code: string, message: string, warnType?: string) => void;
+ innerApiCalls: {[name: string]: Function};
+ pathTemplates: {[name: string]: gax.PathTemplate};
+ mapsPlatformDatasetsStub?: Promise<{[name: string]: Function}>;
+
+ /**
+ * Construct an instance of MapsPlatformDatasetsClient.
+ *
+ * @param {object} [options] - The configuration object.
+ * The options accepted by the constructor are described in detail
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
+ * The common options are:
+ * @param {object} [options.credentials] - Credentials object.
+ * @param {string} [options.credentials.client_email]
+ * @param {string} [options.credentials.private_key]
+ * @param {string} [options.email] - Account email address. Required when
+ * using a .pem or .p12 keyFilename.
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
+ * .p12 key downloaded from the Google Developers Console. If you provide
+ * a path to a JSON file, the projectId option below is not necessary.
+ * NOTE: .pem and .p12 require you to specify options.email as well.
+ * @param {number} [options.port] - The port on which to connect to
+ * the remote host.
+ * @param {string} [options.projectId] - The project ID from the Google
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
+ * app is running in an environment which supports
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
+ * your project ID will be detected automatically.
+ * @param {string} [options.apiEndpoint] - The domain name of the
+ * API remote host.
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
+ * Follows the structure of {@link gapicConfig}.
+ * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
+ * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
+ * For more information, please check the
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
+ * need to avoid loading the default gRPC version and want to use the fallback
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
+ * ```
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
+ * const client = new MapsPlatformDatasetsClient({fallback: 'rest'}, gax);
+ * ```
+ */
+ constructor(
+ opts?: ClientOptions,
+ gaxInstance?: typeof gax | typeof gax.fallback
+ ) {
+ // Ensure that options include all the required fields.
+ const staticMembers = this.constructor as typeof MapsPlatformDatasetsClient;
+ const servicePath =
+ opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
+ this._providedCustomServicePath = !!(
+ opts?.servicePath || opts?.apiEndpoint
+ );
+ const port = opts?.port || staticMembers.port;
+ const clientConfig = opts?.clientConfig ?? {};
+ const fallback =
+ opts?.fallback ??
+ (typeof window !== 'undefined' && typeof window?.fetch === 'function');
+ opts = Object.assign({servicePath, port, clientConfig, fallback}, opts);
+
+ // Request numeric enum values if REST transport is used.
+ opts.numericEnums = true;
+
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
+ opts['scopes'] = staticMembers.scopes;
+ }
+
+ // Load google-gax module synchronously if needed
+ if (!gaxInstance) {
+ gaxInstance = require('google-gax') as typeof gax;
+ }
+
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
+
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
+
+ // Save options to use in initialize() method.
+ this._opts = opts;
+
+ // Save the auth object to the client, for use by other methods.
+ this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
+
+ // Set useJWTAccessWithScope on the auth object.
+ this.auth.useJWTAccessWithScope = true;
+
+ // Set defaultServicePath on the auth object.
+ this.auth.defaultServicePath = staticMembers.servicePath;
+
+ // Set the default scopes in auth client if needed.
+ if (servicePath === staticMembers.servicePath) {
+ this.auth.defaultScopes = staticMembers.scopes;
+ }
+
+ // Determine the client header string.
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
+ if (typeof process !== 'undefined' && 'versions' in process) {
+ clientHeader.push(`gl-node/${process.versions.node}`);
+ } else {
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
+ }
+ if (!opts.fallback) {
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
+ } else if (opts.fallback === 'rest') {
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
+ }
+ if (opts.libName && opts.libVersion) {
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
+ }
+ // Load the applicable protos.
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
+
+ // This API contains "path templates"; forward-slash-separated
+ // identifiers to uniquely identify resources within the API.
+ // Create useful helper objects for these.
+ this.pathTemplates = {
+ datasetPathTemplate: new this._gaxModule.PathTemplate(
+ 'projects/{project}/datasets/{dataset}'
+ ),
+ };
+
+ // Some of the methods on this service return "paged" results,
+ // (e.g. 50 results at a time, with tokens to get subsequent
+ // pages). Denote the keys used for pagination and results.
+ this.descriptors.page = {
+ listDatasets: new this._gaxModule.PageDescriptor(
+ 'pageToken',
+ 'nextPageToken',
+ 'datasets'
+ ),
+ };
+
+ // Put together the default options sent with requests.
+ this._defaults = this._gaxGrpc.constructSettings(
+ 'google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets',
+ gapicConfig as gax.ClientConfig,
+ opts.clientConfig || {},
+ {'x-goog-api-client': clientHeader.join(' ')}
+ );
+
+ // Set up a dictionary of "inner API calls"; the core implementation
+ // of calling the API is handled in `google-gax`, with this code
+ // merely providing the destination and request information.
+ this.innerApiCalls = {};
+
+ // Add a warn function to the client constructor so it can be easily tested.
+ this.warn = this._gaxModule.warn;
+ }
+
+ /**
+ * Initialize the client.
+ * Performs asynchronous operations (such as authentication) and prepares the client.
+ * This function will be called automatically when any class method is called for the
+ * first time, but if you need to initialize it before calling an actual method,
+ * feel free to call initialize() directly.
+ *
+ * You can await on this method if you want to make sure the client is initialized.
+ *
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
+ */
+ initialize() {
+ // If the client stub promise is already initialized, return immediately.
+ if (this.mapsPlatformDatasetsStub) {
+ return this.mapsPlatformDatasetsStub;
+ }
+
+ // Put together the "service stub" for
+ // google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets.
+ this.mapsPlatformDatasetsStub = this._gaxGrpc.createStub(
+ this._opts.fallback
+ ? (this._protos as protobuf.Root).lookupService(
+ 'google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets'
+ )
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (this._protos as any).google.maps.mapsplatformdatasets.v1
+ .MapsPlatformDatasets,
+ this._opts,
+ this._providedCustomServicePath
+ ) as Promise<{[method: string]: Function}>;
+
+ // Iterate over each of the methods that the service provides
+ // and create an API call method for each.
+ const mapsPlatformDatasetsStubMethods = [
+ 'createDataset',
+ 'updateDatasetMetadata',
+ 'getDataset',
+ 'listDatasets',
+ 'deleteDataset',
+ ];
+ for (const methodName of mapsPlatformDatasetsStubMethods) {
+ const callPromise = this.mapsPlatformDatasetsStub.then(
+ stub =>
+ (...args: Array<{}>) => {
+ if (this._terminated) {
+ return Promise.reject('The client has already been closed.');
+ }
+ const func = stub[methodName];
+ return func.apply(stub, args);
+ },
+ (err: Error | null | undefined) => () => {
+ throw err;
+ }
+ );
+
+ const descriptor = this.descriptors.page[methodName] || undefined;
+ const apiCall = this._gaxModule.createApiCall(
+ callPromise,
+ this._defaults[methodName],
+ descriptor,
+ this._opts.fallback
+ );
+
+ this.innerApiCalls[methodName] = apiCall;
+ }
+
+ return this.mapsPlatformDatasetsStub;
+ }
+
+ /**
+ * The DNS address for this API service.
+ * @returns {string} The DNS address for this service.
+ */
+ static get servicePath() {
+ return 'mapsplatformdatasets.googleapis.com';
+ }
+
+ /**
+ * The DNS address for this API service - same as servicePath(),
+ * exists for compatibility reasons.
+ * @returns {string} The DNS address for this service.
+ */
+ static get apiEndpoint() {
+ return 'mapsplatformdatasets.googleapis.com';
+ }
+
+ /**
+ * The port for this API service.
+ * @returns {number} The default port for this service.
+ */
+ static get port() {
+ return 443;
+ }
+
+ /**
+ * The scopes needed to make gRPC calls for every method defined
+ * in this service.
+ * @returns {string[]} List of default scopes.
+ */
+ static get scopes() {
+ return ['https://www.googleapis.com/auth/cloud-platform'];
+ }
+
+ getProjectId(): Promise;
+ getProjectId(callback: Callback): void;
+ /**
+ * Return the project ID used by this class.
+ * @returns {Promise} A promise that resolves to string containing the project ID.
+ */
+ getProjectId(
+ callback?: Callback
+ ): Promise | void {
+ if (callback) {
+ this.auth.getProjectId(callback);
+ return;
+ }
+ return this.auth.getProjectId();
+ }
+
+ // -------------------
+ // -- Service calls --
+ // -------------------
+ /**
+ * Create a new dataset for the specified project.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. Parent project that will own the dataset.
+ * Format: projects/{$project}
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} request.dataset
+ * Required. The dataset version to create.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/maps_platform_datasets.create_dataset.js
+ * region_tag:mapsplatformdatasets_v1_generated_MapsPlatformDatasets_CreateDataset_async
+ */
+ createDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ >;
+ createDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ createDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ createDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest,
+ optionsOrCallback?:
+ | CallOptions
+ | Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >,
+ callback?: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.ICreateDatasetRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ > | void {
+ request = request || {};
+ let options: CallOptions;
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
+ callback = optionsOrCallback;
+ options = {};
+ } else {
+ options = optionsOrCallback as CallOptions;
+ }
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ parent: request.parent ?? '',
+ });
+ this.initialize();
+ return this.innerApiCalls.createDataset(request, options, callback);
+ }
+ /**
+ * Update the metadata for the dataset.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {google.maps.mapsplatformdatasets.v1.Dataset} request.dataset
+ * Required. The dataset to update. The dataset's name is used to identify the
+ * dataset to be updated. The name has the format:
+ * projects/{project}/datasets/{dataset_id}
+ * @param {google.protobuf.FieldMask} request.updateMask
+ * The list of fields to be updated. Support the value "*" for full
+ * replacement.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/maps_platform_datasets.update_dataset_metadata.js
+ * region_tag:mapsplatformdatasets_v1_generated_MapsPlatformDatasets_UpdateDatasetMetadata_async
+ */
+ updateDatasetMetadata(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ >;
+ updateDatasetMetadata(
+ request: protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateDatasetMetadata(
+ request: protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ updateDatasetMetadata(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest,
+ optionsOrCallback?:
+ | CallOptions
+ | Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >,
+ callback?: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.IUpdateDatasetMetadataRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ > | void {
+ request = request || {};
+ let options: CallOptions;
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
+ callback = optionsOrCallback;
+ options = {};
+ } else {
+ options = optionsOrCallback as CallOptions;
+ }
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ 'dataset.name': request.dataset!.name ?? '',
+ });
+ this.initialize();
+ return this.innerApiCalls.updateDatasetMetadata(request, options, callback);
+ }
+ /**
+ * Get the dataset.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Required. Resource name. projects/{project}/datasets/{dataset_id}
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/maps_platform_datasets.get_dataset.js
+ * region_tag:mapsplatformdatasets_v1_generated_MapsPlatformDatasets_GetDataset_async
+ */
+ getDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest | undefined,
+ {} | undefined
+ ]
+ >;
+ getDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ getDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest,
+ callback: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ getDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest,
+ optionsOrCallback?:
+ | CallOptions
+ | Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >,
+ callback?: Callback<
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ | protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset,
+ protos.google.maps.mapsplatformdatasets.v1.IGetDatasetRequest | undefined,
+ {} | undefined
+ ]
+ > | void {
+ request = request || {};
+ let options: CallOptions;
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
+ callback = optionsOrCallback;
+ options = {};
+ } else {
+ options = optionsOrCallback as CallOptions;
+ }
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ name: request.name ?? '',
+ });
+ this.initialize();
+ return this.innerApiCalls.getDataset(request, options, callback);
+ }
+ /**
+ * Delete the specified dataset .
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Required. Format: projects/${project}/datasets/{dataset_id}
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/maps_platform_datasets.delete_dataset.js
+ * region_tag:mapsplatformdatasets_v1_generated_MapsPlatformDatasets_DeleteDataset_async
+ */
+ deleteDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ >;
+ deleteDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest,
+ options: CallOptions,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ deleteDataset(
+ request: protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest,
+ callback: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): void;
+ deleteDataset(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest,
+ optionsOrCallback?:
+ | CallOptions
+ | Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >,
+ callback?: Callback<
+ protos.google.protobuf.IEmpty,
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): Promise<
+ [
+ protos.google.protobuf.IEmpty,
+ (
+ | protos.google.maps.mapsplatformdatasets.v1.IDeleteDatasetRequest
+ | undefined
+ ),
+ {} | undefined
+ ]
+ > | void {
+ request = request || {};
+ let options: CallOptions;
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
+ callback = optionsOrCallback;
+ options = {};
+ } else {
+ options = optionsOrCallback as CallOptions;
+ }
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ name: request.name ?? '',
+ });
+ this.initialize();
+ return this.innerApiCalls.deleteDataset(request, options, callback);
+ }
+
+ /**
+ * List all the datasets for the specified project.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The name of the project to list all the datasets for.
+ * @param {number} request.pageSize
+ * The maximum number of versions to return per page.
+ * If unspecified (or zero), all datasets will be returned.
+ * @param {string} request.pageToken
+ * The page token, received from a previous ListDatasets call.
+ * Provide this to retrieve the subsequent page.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is Array of {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset}.
+ * The client library will perform auto-pagination by default: it will call the API as many
+ * times as needed and will merge results from all the pages into this array.
+ * Note that it can affect your quota.
+ * We recommend using `listDatasetsAsync()`
+ * method described below for async iteration which you can stop as needed.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
+ * for more details and examples.
+ */
+ listDatasets(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset[],
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest | null,
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ ]
+ >;
+ listDatasets(
+ request: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ | protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ | null
+ | undefined,
+ protos.google.maps.mapsplatformdatasets.v1.IDataset
+ >
+ ): void;
+ listDatasets(
+ request: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ callback: PaginationCallback<
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ | protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ | null
+ | undefined,
+ protos.google.maps.mapsplatformdatasets.v1.IDataset
+ >
+ ): void;
+ listDatasets(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ optionsOrCallback?:
+ | CallOptions
+ | PaginationCallback<
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ | protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ | null
+ | undefined,
+ protos.google.maps.mapsplatformdatasets.v1.IDataset
+ >,
+ callback?: PaginationCallback<
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ | protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ | null
+ | undefined,
+ protos.google.maps.mapsplatformdatasets.v1.IDataset
+ >
+ ): Promise<
+ [
+ protos.google.maps.mapsplatformdatasets.v1.IDataset[],
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest | null,
+ protos.google.maps.mapsplatformdatasets.v1.IListDatasetsResponse
+ ]
+ > | void {
+ request = request || {};
+ let options: CallOptions;
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
+ callback = optionsOrCallback;
+ options = {};
+ } else {
+ options = optionsOrCallback as CallOptions;
+ }
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ parent: request.parent ?? '',
+ });
+ this.initialize();
+ return this.innerApiCalls.listDatasets(request, options, callback);
+ }
+
+ /**
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The name of the project to list all the datasets for.
+ * @param {number} request.pageSize
+ * The maximum number of versions to return per page.
+ * If unspecified (or zero), all datasets will be returned.
+ * @param {string} request.pageToken
+ * The page token, received from a previous ListDatasets call.
+ * Provide this to retrieve the subsequent page.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Stream}
+ * An object stream which emits an object representing {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset} on 'data' event.
+ * The client library will perform auto-pagination by default: it will call the API as many
+ * times as needed. Note that it can affect your quota.
+ * We recommend using `listDatasetsAsync()`
+ * method described below for async iteration which you can stop as needed.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
+ * for more details and examples.
+ */
+ listDatasetsStream(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ options?: CallOptions
+ ): Transform {
+ request = request || {};
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ parent: request.parent ?? '',
+ });
+ const defaultCallSettings = this._defaults['listDatasets'];
+ const callSettings = defaultCallSettings.merge(options);
+ this.initialize();
+ return this.descriptors.page.listDatasets.createStream(
+ this.innerApiCalls.listDatasets as GaxCall,
+ request,
+ callSettings
+ );
+ }
+
+ /**
+ * Equivalent to `listDatasets`, but returns an iterable object.
+ *
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.parent
+ * Required. The name of the project to list all the datasets for.
+ * @param {number} request.pageSize
+ * The maximum number of versions to return per page.
+ * If unspecified (or zero), all datasets will be returned.
+ * @param {string} request.pageToken
+ * The page token, received from a previous ListDatasets call.
+ * Provide this to retrieve the subsequent page.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Object}
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
+ * When you iterate the returned iterable, each element will be an object representing
+ * {@link google.maps.mapsplatformdatasets.v1.Dataset | Dataset}. The API will be called under the hood as needed, once per the page,
+ * so you can stop the iteration when you don't need more results.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
+ * for more details and examples.
+ * @example include:samples/generated/v1/maps_platform_datasets.list_datasets.js
+ * region_tag:mapsplatformdatasets_v1_generated_MapsPlatformDatasets_ListDatasets_async
+ */
+ listDatasetsAsync(
+ request?: protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest,
+ options?: CallOptions
+ ): AsyncIterable {
+ request = request || {};
+ options = options || {};
+ options.otherArgs = options.otherArgs || {};
+ options.otherArgs.headers = options.otherArgs.headers || {};
+ options.otherArgs.headers['x-goog-request-params'] =
+ this._gaxModule.routingHeader.fromParams({
+ parent: request.parent ?? '',
+ });
+ const defaultCallSettings = this._defaults['listDatasets'];
+ const callSettings = defaultCallSettings.merge(options);
+ this.initialize();
+ return this.descriptors.page.listDatasets.asyncIterate(
+ this.innerApiCalls['listDatasets'] as GaxCall,
+ request as {},
+ callSettings
+ ) as AsyncIterable;
+ }
+ // --------------------
+ // -- Path templates --
+ // --------------------
+
+ /**
+ * Return a fully-qualified dataset resource name string.
+ *
+ * @param {string} project
+ * @param {string} dataset
+ * @returns {string} Resource name string.
+ */
+ datasetPath(project: string, dataset: string) {
+ return this.pathTemplates.datasetPathTemplate.render({
+ project: project,
+ dataset: dataset,
+ });
+ }
+
+ /**
+ * Parse the project from Dataset resource.
+ *
+ * @param {string} datasetName
+ * A fully-qualified path representing Dataset resource.
+ * @returns {string} A string representing the project.
+ */
+ matchProjectFromDatasetName(datasetName: string) {
+ return this.pathTemplates.datasetPathTemplate.match(datasetName).project;
+ }
+
+ /**
+ * Parse the dataset from Dataset resource.
+ *
+ * @param {string} datasetName
+ * A fully-qualified path representing Dataset resource.
+ * @returns {string} A string representing the dataset.
+ */
+ matchDatasetFromDatasetName(datasetName: string) {
+ return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset;
+ }
+
+ /**
+ * Terminate the gRPC channel and close the client.
+ *
+ * The client will no longer be usable and all future behavior is undefined.
+ * @returns {Promise} A promise that resolves when the client is closed.
+ */
+ close(): Promise {
+ if (this.mapsPlatformDatasetsStub && !this._terminated) {
+ return this.mapsPlatformDatasetsStub.then(stub => {
+ this._terminated = true;
+ stub.close();
+ });
+ }
+ return Promise.resolve();
+ }
+}
diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client_config.json b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client_config.json
new file mode 100644
index 00000000000..9a072527d2f
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client_config.json
@@ -0,0 +1,63 @@
+{
+ "interfaces": {
+ "google.maps.mapsplatformdatasets.v1.MapsPlatformDatasets": {
+ "retry_codes": {
+ "non_idempotent": [],
+ "idempotent": [
+ "DEADLINE_EXCEEDED",
+ "UNAVAILABLE"
+ ],
+ "unavailable": [
+ "UNAVAILABLE"
+ ]
+ },
+ "retry_params": {
+ "default": {
+ "initial_retry_delay_millis": 100,
+ "retry_delay_multiplier": 1.3,
+ "max_retry_delay_millis": 60000,
+ "initial_rpc_timeout_millis": 60000,
+ "rpc_timeout_multiplier": 1,
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 600000
+ },
+ "ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
+ "initial_retry_delay_millis": 1000,
+ "retry_delay_multiplier": 1.3,
+ "max_retry_delay_millis": 10000,
+ "initial_rpc_timeout_millis": 60000,
+ "rpc_timeout_multiplier": 1,
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 600000
+ }
+ },
+ "methods": {
+ "CreateDataset": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "non_idempotent",
+ "retry_params_name": "default"
+ },
+ "UpdateDatasetMetadata": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "non_idempotent",
+ "retry_params_name": "default"
+ },
+ "GetDataset": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "unavailable",
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
+ },
+ "ListDatasets": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "unavailable",
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
+ },
+ "DeleteDataset": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "non_idempotent",
+ "retry_params_name": "default"
+ }
+ }
+ }
+ }
+}
diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_proto_list.json b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_proto_list.json
new file mode 100644
index 00000000000..9a8bc9fc147
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_proto_list.json
@@ -0,0 +1,6 @@
+[
+ "../../protos/google/maps/mapsplatformdatasets/v1/data_source.proto",
+ "../../protos/google/maps/mapsplatformdatasets/v1/dataset.proto",
+ "../../protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets.proto",
+ "../../protos/google/maps/mapsplatformdatasets/v1/maps_platform_datasets_service.proto"
+]
diff --git a/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts b/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts
new file mode 100644
index 00000000000..412ab81f0e4
--- /dev/null
+++ b/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts
@@ -0,0 +1,1176 @@
+// Copyright 2023 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
+//
+// https://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.
+//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
+
+import * as protos from '../protos/protos';
+import * as assert from 'assert';
+import * as sinon from 'sinon';
+import {SinonStub} from 'sinon';
+import {describe, it} from 'mocha';
+import * as mapsplatformdatasetsModule from '../src';
+
+import {PassThrough} from 'stream';
+
+import {protobuf} from 'google-gax';
+
+// Dynamically loaded proto JSON is needed to get the type information
+// to fill in default values for request objects
+const root = protobuf.Root.fromJSON(
+ require('../protos/protos.json')
+).resolveAll();
+
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+function getTypeDefaultValue(typeName: string, fields: string[]) {
+ let type = root.lookupType(typeName) as protobuf.Type;
+ for (const field of fields.slice(0, -1)) {
+ type = type.fields[field]?.resolvedType as protobuf.Type;
+ }
+ return type.fields[fields[fields.length - 1]]?.defaultValue;
+}
+
+function generateSampleMessage(instance: T) {
+ const filledObject = (
+ instance.constructor as typeof protobuf.Message
+ ).toObject(instance as protobuf.Message, {defaults: true});
+ return (instance.constructor as typeof protobuf.Message).fromObject(
+ filledObject
+ ) as T;
+}
+
+function stubSimpleCall(response?: ResponseType, error?: Error) {
+ return error
+ ? sinon.stub().rejects(error)
+ : sinon.stub().resolves([response]);
+}
+
+function stubSimpleCallWithCallback(
+ response?: ResponseType,
+ error?: Error
+) {
+ return error
+ ? sinon.stub().callsArgWith(2, error)
+ : sinon.stub().callsArgWith(2, null, response);
+}
+
+function stubPageStreamingCall(
+ responses?: ResponseType[],
+ error?: Error
+) {
+ const pagingStub = sinon.stub();
+ if (responses) {
+ for (let i = 0; i < responses.length; ++i) {
+ pagingStub.onCall(i).callsArgWith(2, null, responses[i]);
+ }
+ }
+ const transformStub = error
+ ? sinon.stub().callsArgWith(2, error)
+ : pagingStub;
+ const mockStream = new PassThrough({
+ objectMode: true,
+ transform: transformStub,
+ });
+ // trigger as many responses as needed
+ if (responses) {
+ for (let i = 0; i < responses.length; ++i) {
+ setImmediate(() => {
+ mockStream.write({});
+ });
+ }
+ setImmediate(() => {
+ mockStream.end();
+ });
+ } else {
+ setImmediate(() => {
+ mockStream.write({});
+ });
+ setImmediate(() => {
+ mockStream.end();
+ });
+ }
+ return sinon.stub().returns(mockStream);
+}
+
+function stubAsyncIterationCall(
+ responses?: ResponseType[],
+ error?: Error
+) {
+ let counter = 0;
+ const asyncIterable = {
+ [Symbol.asyncIterator]() {
+ return {
+ async next() {
+ if (error) {
+ return Promise.reject(error);
+ }
+ if (counter >= responses!.length) {
+ return Promise.resolve({done: true, value: undefined});
+ }
+ return Promise.resolve({done: false, value: responses![counter++]});
+ },
+ };
+ },
+ };
+ return sinon.stub().returns(asyncIterable);
+}
+
+describe('v1.MapsPlatformDatasetsClient', () => {
+ describe('Common methods', () => {
+ it('has servicePath', () => {
+ const servicePath =
+ mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient.servicePath;
+ assert(servicePath);
+ });
+
+ it('has apiEndpoint', () => {
+ const apiEndpoint =
+ mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient.apiEndpoint;
+ assert(apiEndpoint);
+ });
+
+ it('has port', () => {
+ const port =
+ mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient.port;
+ assert(port);
+ assert(typeof port === 'number');
+ });
+
+ it('should create a client with no option', () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient();
+ assert(client);
+ });
+
+ it('should create a client with gRPC fallback', () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ fallback: true,
+ });
+ assert(client);
+ });
+
+ it('has initialize method and supports deferred initialization', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ assert.strictEqual(client.mapsPlatformDatasetsStub, undefined);
+ await client.initialize();
+ assert(client.mapsPlatformDatasetsStub);
+ });
+
+ it('has close method for the initialized client', done => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ assert(client.mapsPlatformDatasetsStub);
+ client.close().then(() => {
+ done();
+ });
+ });
+
+ it('has close method for the non-initialized client', done => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ assert.strictEqual(client.mapsPlatformDatasetsStub, undefined);
+ client.close().then(() => {
+ done();
+ });
+ });
+
+ it('has getProjectId method', async () => {
+ const fakeProjectId = 'fake-project-id';
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.auth.getProjectId = sinon.stub().resolves(fakeProjectId);
+ const result = await client.getProjectId();
+ assert.strictEqual(result, fakeProjectId);
+ assert((client.auth.getProjectId as SinonStub).calledWithExactly());
+ });
+
+ it('has getProjectId method with callback', async () => {
+ const fakeProjectId = 'fake-project-id';
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.auth.getProjectId = sinon
+ .stub()
+ .callsArgWith(0, null, fakeProjectId);
+ const promise = new Promise((resolve, reject) => {
+ client.getProjectId((err?: Error | null, projectId?: string | null) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(projectId);
+ }
+ });
+ });
+ const result = await promise;
+ assert.strictEqual(result, fakeProjectId);
+ });
+ });
+
+ describe('createDataset', () => {
+ it('invokes createDataset without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.createDataset = stubSimpleCall(expectedResponse);
+ const [response] = await client.createDataset(request);
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes createDataset without error using callback', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.createDataset =
+ stubSimpleCallWithCallback(expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.createDataset(
+ request,
+ (
+ err?: Error | null,
+ result?: protos.google.maps.mapsplatformdatasets.v1.IDataset | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes createDataset with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.innerApiCalls.createDataset = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(client.createDataset(request), expectedError);
+ const actualRequest = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.createDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes createDataset with closed client', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedError = new Error('The client has already been closed.');
+ client.close();
+ await assert.rejects(client.createDataset(request), expectedError);
+ });
+ });
+
+ describe('updateDatasetMetadata', () => {
+ it('invokes updateDatasetMetadata without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest()
+ );
+ request.dataset ??= {};
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest',
+ ['dataset', 'name']
+ );
+ request.dataset.name = defaultValue1;
+ const expectedHeaderRequestParams = `dataset.name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.updateDatasetMetadata =
+ stubSimpleCall(expectedResponse);
+ const [response] = await client.updateDatasetMetadata(request);
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes updateDatasetMetadata without error using callback', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest()
+ );
+ request.dataset ??= {};
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest',
+ ['dataset', 'name']
+ );
+ request.dataset.name = defaultValue1;
+ const expectedHeaderRequestParams = `dataset.name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.updateDatasetMetadata =
+ stubSimpleCallWithCallback(expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.updateDatasetMetadata(
+ request,
+ (
+ err?: Error | null,
+ result?: protos.google.maps.mapsplatformdatasets.v1.IDataset | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes updateDatasetMetadata with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest()
+ );
+ request.dataset ??= {};
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest',
+ ['dataset', 'name']
+ );
+ request.dataset.name = defaultValue1;
+ const expectedHeaderRequestParams = `dataset.name=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.innerApiCalls.updateDatasetMetadata = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(
+ client.updateDatasetMetadata(request),
+ expectedError
+ );
+ const actualRequest = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.updateDatasetMetadata as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes updateDatasetMetadata with closed client', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest()
+ );
+ request.dataset ??= {};
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest',
+ ['dataset', 'name']
+ );
+ request.dataset.name = defaultValue1;
+ const expectedError = new Error('The client has already been closed.');
+ client.close();
+ await assert.rejects(
+ client.updateDatasetMetadata(request),
+ expectedError
+ );
+ });
+ });
+
+ describe('getDataset', () => {
+ it('invokes getDataset without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.GetDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.getDataset = stubSimpleCall(expectedResponse);
+ const [response] = await client.getDataset(request);
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes getDataset without error using callback', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.GetDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ );
+ client.innerApiCalls.getDataset =
+ stubSimpleCallWithCallback(expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.getDataset(
+ request,
+ (
+ err?: Error | null,
+ result?: protos.google.maps.mapsplatformdatasets.v1.IDataset | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes getDataset with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.GetDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.innerApiCalls.getDataset = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(client.getDataset(request), expectedError);
+ const actualRequest = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.getDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes getDataset with closed client', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.GetDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedError = new Error('The client has already been closed.');
+ client.close();
+ await assert.rejects(client.getDataset(request), expectedError);
+ });
+ });
+
+ describe('deleteDataset', () => {
+ it('invokes deleteDataset without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.protobuf.Empty()
+ );
+ client.innerApiCalls.deleteDataset = stubSimpleCall(expectedResponse);
+ const [response] = await client.deleteDataset(request);
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes deleteDataset without error using callback', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedResponse = generateSampleMessage(
+ new protos.google.protobuf.Empty()
+ );
+ client.innerApiCalls.deleteDataset =
+ stubSimpleCallWithCallback(expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.deleteDataset(
+ request,
+ (
+ err?: Error | null,
+ result?: protos.google.protobuf.IEmpty | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes deleteDataset with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedHeaderRequestParams = `name=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.innerApiCalls.deleteDataset = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(client.deleteDataset(request), expectedError);
+ const actualRequest = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.deleteDataset as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes deleteDataset with closed client', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest',
+ ['name']
+ );
+ request.name = defaultValue1;
+ const expectedError = new Error('The client has already been closed.');
+ client.close();
+ await assert.rejects(client.deleteDataset(request), expectedError);
+ });
+ });
+
+ describe('listDatasets', () => {
+ it('invokes listDatasets without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = [
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ ];
+ client.innerApiCalls.listDatasets = stubSimpleCall(expectedResponse);
+ const [response] = await client.listDatasets(request);
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes listDatasets without error using callback', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = [
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ ];
+ client.innerApiCalls.listDatasets =
+ stubSimpleCallWithCallback(expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.listDatasets(
+ request,
+ (
+ err?: Error | null,
+ result?:
+ | protos.google.maps.mapsplatformdatasets.v1.IDataset[]
+ | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ const actualRequest = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes listDatasets with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.innerApiCalls.listDatasets = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(client.listDatasets(request), expectedError);
+ const actualRequest = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[0];
+ assert.deepStrictEqual(actualRequest, request);
+ const actualHeaderRequestParams = (
+ client.innerApiCalls.listDatasets as SinonStub
+ ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
+ assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
+ });
+
+ it('invokes listDatasetsStream without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = [
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ ];
+ client.descriptors.page.listDatasets.createStream =
+ stubPageStreamingCall(expectedResponse);
+ const stream = client.listDatasetsStream(request);
+ const promise = new Promise((resolve, reject) => {
+ const responses: protos.google.maps.mapsplatformdatasets.v1.Dataset[] =
+ [];
+ stream.on(
+ 'data',
+ (response: protos.google.maps.mapsplatformdatasets.v1.Dataset) => {
+ responses.push(response);
+ }
+ );
+ stream.on('end', () => {
+ resolve(responses);
+ });
+ stream.on('error', (err: Error) => {
+ reject(err);
+ });
+ });
+ const responses = await promise;
+ assert.deepStrictEqual(responses, expectedResponse);
+ assert(
+ (client.descriptors.page.listDatasets.createStream as SinonStub)
+ .getCall(0)
+ .calledWith(client.innerApiCalls.listDatasets, request)
+ );
+ assert(
+ (client.descriptors.page.listDatasets.createStream as SinonStub)
+ .getCall(0)
+ .args[2].otherArgs.headers['x-goog-request-params'].includes(
+ expectedHeaderRequestParams
+ )
+ );
+ });
+
+ it('invokes listDatasetsStream with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.descriptors.page.listDatasets.createStream = stubPageStreamingCall(
+ undefined,
+ expectedError
+ );
+ const stream = client.listDatasetsStream(request);
+ const promise = new Promise((resolve, reject) => {
+ const responses: protos.google.maps.mapsplatformdatasets.v1.Dataset[] =
+ [];
+ stream.on(
+ 'data',
+ (response: protos.google.maps.mapsplatformdatasets.v1.Dataset) => {
+ responses.push(response);
+ }
+ );
+ stream.on('end', () => {
+ resolve(responses);
+ });
+ stream.on('error', (err: Error) => {
+ reject(err);
+ });
+ });
+ await assert.rejects(promise, expectedError);
+ assert(
+ (client.descriptors.page.listDatasets.createStream as SinonStub)
+ .getCall(0)
+ .calledWith(client.innerApiCalls.listDatasets, request)
+ );
+ assert(
+ (client.descriptors.page.listDatasets.createStream as SinonStub)
+ .getCall(0)
+ .args[2].otherArgs.headers['x-goog-request-params'].includes(
+ expectedHeaderRequestParams
+ )
+ );
+ });
+
+ it('uses async iteration with listDatasets without error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedResponse = [
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.Dataset()
+ ),
+ ];
+ client.descriptors.page.listDatasets.asyncIterate =
+ stubAsyncIterationCall(expectedResponse);
+ const responses: protos.google.maps.mapsplatformdatasets.v1.IDataset[] =
+ [];
+ const iterable = client.listDatasetsAsync(request);
+ for await (const resource of iterable) {
+ responses.push(resource!);
+ }
+ assert.deepStrictEqual(responses, expectedResponse);
+ assert.deepStrictEqual(
+ (
+ client.descriptors.page.listDatasets.asyncIterate as SinonStub
+ ).getCall(0).args[1],
+ request
+ );
+ assert(
+ (client.descriptors.page.listDatasets.asyncIterate as SinonStub)
+ .getCall(0)
+ .args[2].otherArgs.headers['x-goog-request-params'].includes(
+ expectedHeaderRequestParams
+ )
+ );
+ });
+
+ it('uses async iteration with listDatasets with error', async () => {
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest()
+ );
+ const defaultValue1 = getTypeDefaultValue(
+ '.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest',
+ ['parent']
+ );
+ request.parent = defaultValue1;
+ const expectedHeaderRequestParams = `parent=${defaultValue1}`;
+ const expectedError = new Error('expected');
+ client.descriptors.page.listDatasets.asyncIterate =
+ stubAsyncIterationCall(undefined, expectedError);
+ const iterable = client.listDatasetsAsync(request);
+ await assert.rejects(async () => {
+ const responses: protos.google.maps.mapsplatformdatasets.v1.IDataset[] =
+ [];
+ for await (const resource of iterable) {
+ responses.push(resource!);
+ }
+ });
+ assert.deepStrictEqual(
+ (
+ client.descriptors.page.listDatasets.asyncIterate as SinonStub
+ ).getCall(0).args[1],
+ request
+ );
+ assert(
+ (client.descriptors.page.listDatasets.asyncIterate as SinonStub)
+ .getCall(0)
+ .args[2].otherArgs.headers['x-goog-request-params'].includes(
+ expectedHeaderRequestParams
+ )
+ );
+ });
+ });
+
+ describe('Path templates', () => {
+ describe('dataset', () => {
+ const fakePath = '/rendered/path/dataset';
+ const expectedParameters = {
+ project: 'projectValue',
+ dataset: 'datasetValue',
+ };
+ const client =
+ new mapsplatformdatasetsModule.v1.MapsPlatformDatasetsClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ client.pathTemplates.datasetPathTemplate.render = sinon
+ .stub()
+ .returns(fakePath);
+ client.pathTemplates.datasetPathTemplate.match = sinon
+ .stub()
+ .returns(expectedParameters);
+
+ it('datasetPath', () => {
+ const result = client.datasetPath('projectValue', 'datasetValue');
+ assert.strictEqual(result, fakePath);
+ assert(
+ (client.pathTemplates.datasetPathTemplate.render as SinonStub)
+ .getCall(-1)
+ .calledWith(expectedParameters)
+ );
+ });
+
+ it('matchProjectFromDatasetName', () => {
+ const result = client.matchProjectFromDatasetName(fakePath);
+ assert.strictEqual(result, 'projectValue');
+ assert(
+ (client.pathTemplates.datasetPathTemplate.match as SinonStub)
+ .getCall(-1)
+ .calledWith(fakePath)
+ );
+ });
+
+ it('matchDatasetFromDatasetName', () => {
+ const result = client.matchDatasetFromDatasetName(fakePath);
+ assert.strictEqual(result, 'datasetValue');
+ assert(
+ (client.pathTemplates.datasetPathTemplate.match as SinonStub)
+ .getCall(-1)
+ .calledWith(fakePath)
+ );
+ });
+ });
+ });
+});
diff --git a/packages/google-maps-mapsplatformdatasets/webpack.config.js b/packages/google-maps-mapsplatformdatasets/webpack.config.js
index d9f44f31e5a..afe735f0276 100644
--- a/packages/google-maps-mapsplatformdatasets/webpack.config.js
+++ b/packages/google-maps-mapsplatformdatasets/webpack.config.js
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.