From bb061e271d683a14aa0689fdec861e0a3ed3a9eb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 16:54:16 +0000 Subject: [PATCH] feat: promote v1beta2 features to v1 (#132) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 436510287 Source-Link: https://github.com/googleapis/googleapis/commit/40083727fe6cfd3ff777690cf6856cf2e24d61c6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b821044bc8b2226418af9b294cf19529ad428b37 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjgyMTA0NGJjOGIyMjI2NDE4YWY5YjI5NGNmMTk1MjlhZDQyOGIzNyJ9 --- .../artifactregistry/v1/apt_artifact.proto | 116 + .../artifactregistry/v1/artifact.proto | 14 +- .../devtools/artifactregistry/v1/file.proto | 123 + .../artifactregistry/v1/package.proto | 88 + .../artifactregistry/v1/repository.proto | 80 +- .../artifactregistry/v1/service.proto | 248 +- .../artifactregistry/v1/settings.proto | 84 + .../devtools/artifactregistry/v1/tag.proto | 118 + .../artifactregistry/v1/version.proto | 127 + .../artifactregistry/v1/yum_artifact.proto | 108 + .../protos/protos.d.ts | 7443 +++++-- .../protos/protos.js | 17533 +++++++++++++--- .../protos/protos.json | 1792 +- .../v1/artifact_registry.create_repository.js | 67 + .../v1/artifact_registry.create_tag.js | 65 + .../v1/artifact_registry.delete_package.js | 59 + .../v1/artifact_registry.delete_repository.js | 59 + .../v1/artifact_registry.delete_tag.js | 57 + .../v1/artifact_registry.delete_version.js | 63 + .../v1/artifact_registry.get_docker_image.js | 58 + .../v1/artifact_registry.get_file.js | 57 + .../v1/artifact_registry.get_iam_policy.js | 64 + .../v1/artifact_registry.get_package.js | 58 + .../artifact_registry.get_project_settings.js | 58 + .../generated/v1/artifact_registry.get_tag.js | 57 + .../v1/artifact_registry.get_version.js | 61 + .../artifact_registry.import_apt_artifacts.js | 62 + .../artifact_registry.import_yum_artifacts.js | 62 + .../v1/artifact_registry.list_files.js | 84 + .../v1/artifact_registry.list_packages.js | 68 + .../v1/artifact_registry.list_repositories.js | 2 +- .../v1/artifact_registry.list_tags.js | 76 + .../v1/artifact_registry.list_versions.js | 75 + .../v1/artifact_registry.set_iam_policy.js | 67 + .../artifact_registry.test_iam_permissions.js | 67 + ...tifact_registry.update_project_settings.js | 61 + .../v1/artifact_registry.update_repository.js | 63 + .../v1/artifact_registry.update_tag.js | 63 + ...a.google.devtools.artifactregistry.v1.json | 1068 + .../src/v1/artifact_registry_client.ts | 3840 +++- .../v1/artifact_registry_client_config.json | 120 + .../src/v1/artifact_registry_proto_list.json | 9 +- .../src/v1/gapic_metadata.json | 256 + .../test/gapic_artifact_registry_v1.ts | 5087 ++++- 44 files changed, 34437 insertions(+), 5350 deletions(-) create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto create mode 100644 packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js create mode 100644 packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto new file mode 100644 index 00000000000..c8fcb10c4e8 --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/apt_artifact.proto @@ -0,0 +1,116 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "AptArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A detailed representation of an Apt artifact. Information in the record +// is derived from the archive's control file. +// See https://www.debian.org/doc/debian-policy/ch-controlfields.html +message AptArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/AptArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" + }; + + // Package type is either binary or source. + enum PackageType { + // Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0; + + // Binary package. + BINARY = 1; + + // Source package. + SOURCE = 2; + } + + // Output only. The Artifact Registry resource name of the artifact. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Apt package name of the artifact. + string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An artifact is a binary or source package. + PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operating system architecture of the artifact. + string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repository component of the artifact. + string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Contents of the artifact's control metadata file. + bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Google Cloud Storage location where the artifacts currently reside. +message ImportAptArtifactsGcsSource { + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + repeated string uris = 1; + + // Supports URI wildcards for matching multiple objects from a single URI. + bool use_wildcards = 2; +} + +// The request to import new apt artifacts. +message ImportAptArtifactsRequest { + // The source location of the package binaries. + oneof source { + // Google Cloud Storage location where input content is located. + ImportAptArtifactsGcsSource gcs_source = 2; + } + + // The name of the parent resource where the artifacts will be imported. + string parent = 1; +} + +// Error information explaining why a package was not imported. +message ImportAptArtifactsErrorInfo { + // The source that was not imported. + oneof source { + // Google Cloud Storage location requested. + ImportAptArtifactsGcsSource gcs_source = 1; + } + + // The detailed error status. + google.rpc.Status error = 2; +} + +// The response message from importing APT artifacts. +message ImportAptArtifactsResponse { + // The Apt artifacts imported. + repeated AptArtifact apt_artifacts = 1; + + // Detailed error info for packages that were not imported. + repeated ImportAptArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportAptArtifactsMetadata { + +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto index 9945bdee9f4..14173d57a26 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/artifact.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ package google.devtools.artifactregistry.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; @@ -104,3 +103,14 @@ message ListDockerImagesResponse { // more artifacts to return. string next_page_token = 2; } + +// The request to get docker images. +message GetDockerImageRequest { + // Required. The name of the docker images. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/DockerImage" + } + ]; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto new file mode 100644 index 00000000000..a6b284a927a --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/file.proto @@ -0,0 +1,123 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "FileProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A hash of file content. +message Hash { + // The algorithm used to compute the hash. + enum HashType { + // Unspecified. + HASH_TYPE_UNSPECIFIED = 0; + + // SHA256 hash. + SHA256 = 1; + + // MD5 hash. + MD5 = 2; + } + + // The algorithm used to compute the hash value. + HashType type = 1; + + // The hash value. + bytes value = 2; +} + +// Files store content that is potentially associated with Packages or Versions. +message File { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/File" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }; + + // The name of the file, for example: + // "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". + // If the file ID part contains slashes, they are escaped. + string name = 1; + + // The size of the File in bytes. + int64 size_bytes = 3; + + // The hashes of the file content. + repeated Hash hashes = 4; + + // The time when the File was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the File was last updated. + google.protobuf.Timestamp update_time = 6; + + // The name of the Package or Version that owns this file, if any. + string owner = 7; +} + +// The request to list files. +message ListFilesRequest { + // The name of the repository whose files will be listed. For example: + // "projects/p1/locations/us-central1/repositories/repo1 + string parent = 1; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `name` + // * `owner` + // + // An example of using a filter: + // + // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + // ID starting with "a/b/". + // * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + // Files owned by the version `1.0` in package `pkg1`. + string filter = 4; + + // The maximum number of files to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The field to order the results by. + string order_by = 5; +} + +// The response from listing files. +message ListFilesResponse { + // The files returned. + repeated File files = 1; + + // The token to retrieve the next page of files, or empty if there are no + // more files to return. + string next_page_token = 2; +} + +// The request to retrieve a file. +message GetFileRequest { + // The name of the file to retrieve. + string name = 1; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto new file mode 100644 index 00000000000..8566035ef05 --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/package.proto @@ -0,0 +1,88 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "PackageProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// Packages are named collections of versions. +message Package { + + // The name of the package, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + // If the package ID part contains slashes, the slashes are escaped. + string name = 1; + + // The display name of the package. + string display_name = 2; + + // The time when the package was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the package was last updated. This includes publishing a new + // version of the package. + google.protobuf.Timestamp update_time = 6; +} + +// The request to list packages. +message ListPackagesRequest { + // Required. The name of the parent resource whose packages will be listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED + ]; + + // The maximum number of packages to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing packages. +message ListPackagesResponse { + // The packages returned. + repeated Package packages = 1; + + // The token to retrieve the next page of packages, or empty if there are no + // more packages to return. + string next_page_token = 2; +} + +// The request to retrieve a package. +message GetPackageRequest { + // Required. The name of the package to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED + ]; +} + +// The request to delete a package. +message DeletePackageRequest { + // Required. The name of the package to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED + ]; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto index f4a9e9fa449..092ade2b87e 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/repository.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ package google.devtools.artifactregistry.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; @@ -36,6 +36,32 @@ message Repository { pattern: "projects/{project}/locations/{location}/repositories/{repository}" }; + // MavenRepositoryConfig is maven related repository details. + // Provides additional configuration details for repositories of the maven + // format type. + message MavenRepositoryConfig { + // VersionPolicy is the version policy for the repository. + enum VersionPolicy { + // VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + // When the version policy is not defined, no validation is performed + // for the versions. + VERSION_POLICY_UNSPECIFIED = 0; + + // RELEASE - repository will accept only Release versions. + RELEASE = 1; + + // SNAPSHOT - repository will accept only Snapshot versions. + SNAPSHOT = 2; + } + + // The repository with this flag will allow publishing + // the same snapshot versions. + bool allow_snapshot_overwrites = 1; + + // Version policy defines the versions that the registry will accept. + VersionPolicy version_policy = 2; + } + // A package format. enum Format { // Unspecified package format. @@ -60,6 +86,13 @@ message Repository { PYTHON = 8; } + // Repository-specific configurations. + oneof format_config { + // Maven repository config contains repository level configuration + // for the repositories of maven type. + MavenRepositoryConfig maven_config = 9; + } + // The name of the repository, for example: // "projects/p1/locations/us-central1/repositories/repo1". string name = 1; @@ -83,7 +116,7 @@ message Repository { // The time when the repository was last updated. google.protobuf.Timestamp update_time = 6; - // The Cloud KMS resource name of the customer managed encryption key that’s + // The Cloud KMS resource name of the customer managed encryption key that's // used to encrypt the contents of the Repository. Has the form: // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. // This value may not be changed after the Repository has been created. @@ -100,7 +133,7 @@ message ListRepositoriesRequest { } ]; - // The maximum number of repositories to return. + // The maximum number of repositories to return. Maximum page size is 1,000. int32 page_size = 2; // The next_page_token value returned from a previous list request, if any. @@ -127,3 +160,42 @@ message GetRepositoryRequest { } ]; } + +// The request to create a new repository. +message CreateRepositoryRequest { + // Required. The name of the parent resource where the repository will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Repository" + } + ]; + + // The repository id to use for this repository. + string repository_id = 2; + + // The repository to be created. + Repository repository = 3; +} + +// The request to update a repository. +message UpdateRepositoryRequest { + // The repository that replaces the resource on the server. + Repository repository = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a repository. +message DeleteRepositoryRequest { + // Required. The name of the repository to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + } + ]; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto index 535f1ba5185..ed1cee05e1a 100644 --- a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,9 +18,19 @@ package google.devtools.artifactregistry.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/devtools/artifactregistry/v1/apt_artifact.proto"; import "google/devtools/artifactregistry/v1/artifact.proto"; +import "google/devtools/artifactregistry/v1/file.proto"; +import "google/devtools/artifactregistry/v1/package.proto"; import "google/devtools/artifactregistry/v1/repository.proto"; +import "google/devtools/artifactregistry/v1/settings.proto"; +import "google/devtools/artifactregistry/v1/tag.proto"; +import "google/devtools/artifactregistry/v1/version.proto"; +import "google/devtools/artifactregistry/v1/yum_artifact.proto"; +import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; @@ -57,6 +67,44 @@ service ArtifactRegistry { option (google.api.method_signature) = "parent"; } + // Gets a docker image. + rpc GetDockerImage(GetDockerImageRequest) returns (DockerImage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Imports Apt artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + rpc ImportAptArtifacts(ImportAptArtifactsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + }; + } + + // Imports Yum (RPM) artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + rpc ImportYumArtifacts(ImportYumArtifactsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + }; + } + // Lists repositories. rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { option (google.api.http) = { @@ -72,4 +120,202 @@ service ArtifactRegistry { }; option (google.api.method_signature) = "name"; } + + // Creates a repository. The returned Operation will finish once the + // repository has been created. Its response will be the created Repository. + rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/repositories" + body: "repository" + }; + option (google.api.method_signature) = "parent,repository,repository_id"; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1.Repository" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Updates a repository. + rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) { + option (google.api.http) = { + patch: "/v1/{repository.name=projects/*/locations/*/repositories/*}" + body: "repository" + }; + option (google.api.method_signature) = "repository,update_mask"; + } + + // Deletes a repository and all of its contents. The returned Operation will + // finish once the repository has been deleted. It will not have any Operation + // metadata and will return a google.protobuf.Empty response. + rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Lists packages. + rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/packages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a package. + rpc GetPackage(GetPackageRequest) returns (Package) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a package and all of its versions and tags. The returned operation + // will complete once the package has been deleted. + rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Lists versions. + rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a version + rpc GetVersion(GetVersionRequest) returns (Version) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a version and all of its content. The returned operation will + // complete once the version has been deleted. + rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.devtools.artifactregistry.v1.OperationMetadata" + }; + } + + // Lists files. + rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*}/files" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a file. + rpc GetFile(GetFileRequest) returns (File) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/files/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists tags. + rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a tag. + rpc GetTag(GetTagRequest) returns (Tag) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a tag. + rpc CreateTag(CreateTagRequest) returns (Tag) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + body: "tag" + }; + option (google.api.method_signature) = "parent,tag,tag_id"; + } + + // Updates a tag. + rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option (google.api.http) = { + patch: "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + body: "tag" + }; + option (google.api.method_signature) = "tag,update_mask"; + } + + // Deletes a tag. + rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the IAM policy for a given resource. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy" + body: "*" + }; + } + + // Gets the IAM policy for a given resource. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }; + } + + // Tests if the caller has a list of permissions on a resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions" + body: "*" + }; + } + + // Retrieves the Settings for the Project. + rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/projectSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Settings for the Project. + rpc UpdateProjectSettings(UpdateProjectSettingsRequest) returns (ProjectSettings) { + option (google.api.http) = { + patch: "/v1/{project_settings.name=projects/*/projectSettings}" + body: "project_settings" + }; + option (google.api.method_signature) = "project_settings,update_mask"; + } +} + +// Metadata type for longrunning-operations, currently empty. +message OperationMetadata { + } diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto new file mode 100644 index 00000000000..5c4e18c1051 --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/settings.proto @@ -0,0 +1,84 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "SettingsProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The Artifact Registry settings that apply to a Project. +message ProjectSettings { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/ProjectSettings" + pattern: "projects/{project}/projectSettings" + }; + + // The possible redirection states for legacy repositories. + enum RedirectionState { + // No redirection status has been set. + REDIRECTION_STATE_UNSPECIFIED = 0; + + // Redirection is disabled. + REDIRECTION_FROM_GCR_IO_DISABLED = 1; + + // Redirection is enabled. + REDIRECTION_FROM_GCR_IO_ENABLED = 2; + + // Redirection is enabled, and has been finalized so cannot be reverted. + REDIRECTION_FROM_GCR_IO_FINALIZED = 3; + } + + // The name of the project's settings. + // + // Always of the form: + // projects/{project-id}/projectSettings + // + // In update request: never set + // In response: always set + string name = 1; + + // The redirection state of the legacy repositories in this project. + RedirectionState legacy_redirection_state = 2; +} + +// Gets the redirection status for a project. +message GetProjectSettingsRequest { + // Required. The name of the projectSettings resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/ProjectSettings" + } + ]; +} + +// Sets the settings of the project. +message UpdateProjectSettingsRequest { + // The project settings. + ProjectSettings project_settings = 2; + + // Field mask to support partial updates. + google.protobuf.FieldMask update_mask = 3; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto new file mode 100644 index 00000000000..9e8dc6d70bf --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/tag.proto @@ -0,0 +1,118 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "TagProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// Tags point to a version and represent an alternative name that can be used +// to access the version. +message Tag { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Tag" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" + }; + + // The name of the tag, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + // If the package part contains slashes, the slashes are escaped. + // The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + // must be URL encoded. + string name = 1; + + // The name of the version the tag refers to, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" + // If the package or version ID parts contain slashes, the slashes are + // escaped. + string version = 2; +} + +// The request to list tags. +message ListTagsRequest { + // The name of the parent resource whose tags will be listed. + string parent = 1; + + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // * `version` + // + // An example of using a filter: + // + // * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + // --> Tags that are applied to the version `1.0` in package `pkg1`. + string filter = 4; + + // The maximum number of tags to return. Maximum page size is 10,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; +} + +// The response from listing tags. +message ListTagsResponse { + // The tags returned. + repeated Tag tags = 1; + + // The token to retrieve the next page of tags, or empty if there are no + // more tags to return. + string next_page_token = 2; +} + +// The request to retrieve a tag. +message GetTagRequest { + // The name of the tag to retrieve. + string name = 1; +} + +// The request to create a new tag. +message CreateTagRequest { + // The name of the parent resource where the tag will be created. + string parent = 1; + + // The tag id to use for this repository. + string tag_id = 2; + + // The tag to be created. + Tag tag = 3; +} + +// The request to create or update a tag. +message UpdateTagRequest { + // The tag that replaces the resource on the server. + Tag tag = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a tag. +message DeleteTagRequest { + // The name of the tag to delete. + string name = 1; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto new file mode 100644 index 00000000000..f4ac0a92a00 --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/version.proto @@ -0,0 +1,127 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/devtools/artifactregistry/v1/tag.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "VersionProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// The view, which determines what version information is returned in a +// response. +enum VersionView { + // The default / unset value. + // The API will default to the BASIC view. + VERSION_VIEW_UNSPECIFIED = 0; + + // Includes basic information about the version, but not any related tags. + BASIC = 1; + + // Include everything. + FULL = 2; +} + +// The body of a version resource. A version resource represents a +// collection of components, such as files and other data. This may correspond +// to a version in many package management schemes. +message Version { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/Version" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" + }; + + // The name of the version, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". + // If the package or version ID parts contain slashes, the slashes are + // escaped. + string name = 1; + + // Optional. Description of the version, as specified in its metadata. + string description = 3; + + // The time when the version was created. + google.protobuf.Timestamp create_time = 5; + + // The time when the version was last updated. + google.protobuf.Timestamp update_time = 6; + + // Output only. A list of related tags. Will contain up to 100 tags that + // reference this version. + repeated Tag related_tags = 7; + + // Output only. Repository-specific Metadata stored against this version. + // The fields returned are defined by the underlying repository-specific + // resource. Currently, the only resource in use is + // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + google.protobuf.Struct metadata = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to list versions. +message ListVersionsRequest { + // The name of the parent resource whose versions will be listed. + string parent = 1; + + // The maximum number of versions to return. Maximum page size is 1,000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. + string page_token = 3; + + // The view that should be returned in the response. + VersionView view = 4; + + // Optional. The field to order the results by. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from listing versions. +message ListVersionsResponse { + // The versions returned. + repeated Version versions = 1; + + // The token to retrieve the next page of versions, or empty if there are no + // more versions to return. + string next_page_token = 2; +} + +// The request to retrieve a version. +message GetVersionRequest { + // The name of the version to retrieve. + string name = 1; + + // The view that should be returned in the response. + VersionView view = 2; +} + +// The request to delete a version. +message DeleteVersionRequest { + // The name of the version to delete. + string name = 1; + + // By default, a version that is tagged may not be deleted. If force=true, the + // version and any tags pointing to the version are deleted. + bool force = 2; +} diff --git a/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto new file mode 100644 index 00000000000..0d1faafe974 --- /dev/null +++ b/packages/google-devtools-artifactregistry/protos/google/devtools/artifactregistry/v1/yum_artifact.proto @@ -0,0 +1,108 @@ +// Copyright 2022 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.devtools.artifactregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "YumArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; + +// A detailed representation of a Yum artifact. +message YumArtifact { + option (google.api.resource) = { + type: "artifactregistry.googleapis.com/YumArtifact" + pattern: "projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}" + }; + + // Package type is either binary or source. + enum PackageType { + // Package type is not specified. + PACKAGE_TYPE_UNSPECIFIED = 0; + + // Binary package (.rpm). + BINARY = 1; + + // Source package (.srpm). + SOURCE = 2; + } + + // Output only. The Artifact Registry resource name of the artifact. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The yum package name of the artifact. + string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An artifact is a binary or source package. + PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Operating system architecture of the artifact. + string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Google Cloud Storage location where the artifacts currently reside. +message ImportYumArtifactsGcsSource { + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + repeated string uris = 1; + + // Supports URI wildcards for matching multiple objects from a single URI. + bool use_wildcards = 2; +} + +// The request to import new yum artifacts. +message ImportYumArtifactsRequest { + // The source location of the package binaries. + oneof source { + // Google Cloud Storage location where input content is located. + ImportYumArtifactsGcsSource gcs_source = 2; + } + + // The name of the parent resource where the artifacts will be imported. + string parent = 1; +} + +// Error information explaining why a package was not imported. +message ImportYumArtifactsErrorInfo { + // The source that was not imported. + oneof source { + // Google Cloud Storage location requested. + ImportYumArtifactsGcsSource gcs_source = 1; + } + + // The detailed error status. + google.rpc.Status error = 2; +} + +// The response message from importing YUM artifacts. +message ImportYumArtifactsResponse { + // The yum artifacts imported. + repeated YumArtifact yum_artifacts = 1; + + // Detailed error info for packages that were not imported. + repeated ImportYumArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportYumArtifactsMetadata { + +} diff --git a/packages/google-devtools-artifactregistry/protos/protos.d.ts b/packages/google-devtools-artifactregistry/protos/protos.d.ts index 7ce61227a87..4a08948bc97 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.d.ts +++ b/packages/google-devtools-artifactregistry/protos/protos.d.ts @@ -26,843 +26,5632 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of a DockerImage. */ - interface IDockerImage { + /** Properties of an AptArtifact. */ + interface IAptArtifact { - /** DockerImage name */ + /** AptArtifact name */ name?: (string|null); - /** DockerImage uri */ - uri?: (string|null); - - /** DockerImage tags */ - tags?: (string[]|null); + /** AptArtifact packageName */ + packageName?: (string|null); - /** DockerImage imageSizeBytes */ - imageSizeBytes?: (number|Long|string|null); + /** AptArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType|null); - /** DockerImage uploadTime */ - uploadTime?: (google.protobuf.ITimestamp|null); + /** AptArtifact architecture */ + architecture?: (string|null); - /** DockerImage mediaType */ - mediaType?: (string|null); + /** AptArtifact component */ + component?: (string|null); - /** DockerImage buildTime */ - buildTime?: (google.protobuf.ITimestamp|null); + /** AptArtifact controlFile */ + controlFile?: (Uint8Array|string|null); } - /** Represents a DockerImage. */ - class DockerImage implements IDockerImage { + /** Represents an AptArtifact. */ + class AptArtifact implements IAptArtifact { /** - * Constructs a new DockerImage. + * Constructs a new AptArtifact. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IDockerImage); + constructor(properties?: google.devtools.artifactregistry.v1.IAptArtifact); - /** DockerImage name. */ + /** AptArtifact name. */ public name: string; - /** DockerImage uri. */ - public uri: string; - - /** DockerImage tags. */ - public tags: string[]; + /** AptArtifact packageName. */ + public packageName: string; - /** DockerImage imageSizeBytes. */ - public imageSizeBytes: (number|Long|string); + /** AptArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.AptArtifact.PackageType); - /** DockerImage uploadTime. */ - public uploadTime?: (google.protobuf.ITimestamp|null); + /** AptArtifact architecture. */ + public architecture: string; - /** DockerImage mediaType. */ - public mediaType: string; + /** AptArtifact component. */ + public component: string; - /** DockerImage buildTime. */ - public buildTime?: (google.protobuf.ITimestamp|null); + /** AptArtifact controlFile. */ + public controlFile: (Uint8Array|string); /** - * Creates a new DockerImage instance using the specified properties. + * Creates a new AptArtifact instance using the specified properties. * @param [properties] Properties to set - * @returns DockerImage instance + * @returns AptArtifact instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IDockerImage): google.devtools.artifactregistry.v1.DockerImage; + public static create(properties?: google.devtools.artifactregistry.v1.IAptArtifact): google.devtools.artifactregistry.v1.AptArtifact; /** - * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @param message DockerImage message or plain object to encode + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @param message AptArtifact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. - * @param message DockerImage message or plain object to encode + * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. + * @param message AptArtifact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DockerImage message from the specified reader or buffer. + * Decodes an AptArtifact message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DockerImage + * @returns AptArtifact * @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.devtools.artifactregistry.v1.DockerImage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.AptArtifact; /** - * Decodes a DockerImage message from the specified reader or buffer, length delimited. + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DockerImage + * @returns AptArtifact * @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.devtools.artifactregistry.v1.DockerImage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.AptArtifact; /** - * Verifies a DockerImage message. + * Verifies an AptArtifact 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 DockerImage message from a plain object. Also converts values to their respective internal types. + * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DockerImage + * @returns AptArtifact */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DockerImage; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.AptArtifact; /** - * Creates a plain object from a DockerImage message. Also converts values to other types if specified. - * @param message DockerImage + * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. + * @param message AptArtifact * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.DockerImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DockerImage to JSON. + * Converts this AptArtifact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDockerImagesRequest. */ - interface IListDockerImagesRequest { + namespace AptArtifact { - /** ListDockerImagesRequest parent */ - parent?: (string|null); + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } - /** ListDockerImagesRequest pageSize */ - pageSize?: (number|null); + /** Properties of an ImportAptArtifactsGcsSource. */ + interface IImportAptArtifactsGcsSource { - /** ListDockerImagesRequest pageToken */ - pageToken?: (string|null); + /** ImportAptArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportAptArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); } - /** Represents a ListDockerImagesRequest. */ - class ListDockerImagesRequest implements IListDockerImagesRequest { + /** Represents an ImportAptArtifactsGcsSource. */ + class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { /** - * Constructs a new ListDockerImagesRequest. + * Constructs a new ImportAptArtifactsGcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest); - - /** ListDockerImagesRequest parent. */ - public parent: string; + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource); - /** ListDockerImagesRequest pageSize. */ - public pageSize: number; + /** ImportAptArtifactsGcsSource uris. */ + public uris: string[]; - /** ListDockerImagesRequest pageToken. */ - public pageToken: string; + /** ImportAptArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; /** - * Creates a new ListDockerImagesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns ListDockerImagesRequest instance + * @returns ImportAptArtifactsGcsSource instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; /** - * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @param message ListDockerImagesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @param message ImportAptArtifactsGcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. - * @param message ListDockerImagesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. + * @param message ImportAptArtifactsGcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDockerImagesRequest + * @returns ImportAptArtifactsGcsSource * @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.devtools.artifactregistry.v1.ListDockerImagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDockerImagesRequest + * @returns ImportAptArtifactsGcsSource * @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.devtools.artifactregistry.v1.ListDockerImagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; /** - * Verifies a ListDockerImagesRequest message. + * Verifies an ImportAptArtifactsGcsSource 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 ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDockerImagesRequest + * @returns ImportAptArtifactsGcsSource */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource; /** - * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. - * @param message ListDockerImagesRequest + * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. + * @param message ImportAptArtifactsGcsSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDockerImagesRequest to JSON. + * Converts this ImportAptArtifactsGcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDockerImagesResponse. */ - interface IListDockerImagesResponse { + /** Properties of an ImportAptArtifactsRequest. */ + interface IImportAptArtifactsRequest { - /** ListDockerImagesResponse dockerImages */ - dockerImages?: (google.devtools.artifactregistry.v1.IDockerImage[]|null); + /** ImportAptArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - /** ListDockerImagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ImportAptArtifactsRequest parent */ + parent?: (string|null); } - /** Represents a ListDockerImagesResponse. */ - class ListDockerImagesResponse implements IListDockerImagesResponse { + /** Represents an ImportAptArtifactsRequest. */ + class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { /** - * Constructs a new ListDockerImagesResponse. + * Constructs a new ImportAptArtifactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse); + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest); - /** ListDockerImagesResponse dockerImages. */ - public dockerImages: google.devtools.artifactregistry.v1.IDockerImage[]; + /** ImportAptArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - /** ListDockerImagesResponse nextPageToken. */ - public nextPageToken: string; + /** ImportAptArtifactsRequest parent. */ + public parent: string; + + /** ImportAptArtifactsRequest source. */ + public source?: "gcsSource"; /** - * Creates a new ListDockerImagesResponse instance using the specified properties. + * Creates a new ImportAptArtifactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDockerImagesResponse instance + * @returns ImportAptArtifactsRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; /** - * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @param message ListDockerImagesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @param message ImportAptArtifactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. - * @param message ListDockerImagesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. + * @param message ImportAptArtifactsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDockerImagesResponse + * @returns ImportAptArtifactsRequest * @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.devtools.artifactregistry.v1.ListDockerImagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDockerImagesResponse + * @returns ImportAptArtifactsRequest * @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.devtools.artifactregistry.v1.ListDockerImagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; /** - * Verifies a ListDockerImagesResponse message. + * Verifies an ImportAptArtifactsRequest 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 ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDockerImagesResponse + * @returns ImportAptArtifactsRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsRequest; /** - * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. - * @param message ListDockerImagesResponse + * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. + * @param message ImportAptArtifactsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDockerImagesResponse to JSON. + * Converts this ImportAptArtifactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Repository. */ - interface IRepository { + /** Properties of an ImportAptArtifactsErrorInfo. */ + interface IImportAptArtifactsErrorInfo { - /** Repository name */ - name?: (string|null); + /** ImportAptArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - /** Repository format */ - format?: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format|null); + /** ImportAptArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } - /** Repository description */ - description?: (string|null); - - /** Repository labels */ - labels?: ({ [k: string]: string }|null); - - /** Repository createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Repository updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Repository kmsKeyName */ - kmsKeyName?: (string|null); - } - - /** Represents a Repository. */ - class Repository implements IRepository { + /** Represents an ImportAptArtifactsErrorInfo. */ + class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { /** - * Constructs a new Repository. + * Constructs a new ImportAptArtifactsErrorInfo. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IRepository); - - /** Repository name. */ - public name: string; - - /** Repository format. */ - public format: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format); + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo); - /** Repository description. */ - public description: string; - - /** Repository labels. */ - public labels: { [k: string]: string }; - - /** Repository createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportAptArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null); - /** Repository updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportAptArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); - /** Repository kmsKeyName. */ - public kmsKeyName: string; + /** ImportAptArtifactsErrorInfo source. */ + public source?: "gcsSource"; /** - * Creates a new Repository instance using the specified properties. + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. * @param [properties] Properties to set - * @returns Repository instance + * @returns ImportAptArtifactsErrorInfo instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IRepository): google.devtools.artifactregistry.v1.Repository; + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @param message ImportAptArtifactsErrorInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. + * @param message ImportAptArtifactsErrorInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Repository message from the specified reader or buffer. + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Repository + * @returns ImportAptArtifactsErrorInfo * @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.devtools.artifactregistry.v1.Repository; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; /** - * Decodes a Repository message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Repository + * @returns ImportAptArtifactsErrorInfo * @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.devtools.artifactregistry.v1.Repository; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; /** - * Verifies a Repository message. + * Verifies an ImportAptArtifactsErrorInfo 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 Repository message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Repository + * @returns ImportAptArtifactsErrorInfo */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo; /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. - * @param message Repository + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. + * @param message ImportAptArtifactsErrorInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Repository to JSON. + * Converts this ImportAptArtifactsErrorInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Repository { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - DOCKER = 1, - MAVEN = 2, - NPM = 3, - APT = 5, - YUM = 6, - PYTHON = 8 - } - } - - /** Properties of a ListRepositoriesRequest. */ - interface IListRepositoriesRequest { - - /** ListRepositoriesRequest parent */ - parent?: (string|null); + /** Properties of an ImportAptArtifactsResponse. */ + interface IImportAptArtifactsResponse { - /** ListRepositoriesRequest pageSize */ - pageSize?: (number|null); + /** ImportAptArtifactsResponse aptArtifacts */ + aptArtifacts?: (google.devtools.artifactregistry.v1.IAptArtifact[]|null); - /** ListRepositoriesRequest pageToken */ - pageToken?: (string|null); + /** ImportAptArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]|null); } - /** Represents a ListRepositoriesRequest. */ - class ListRepositoriesRequest implements IListRepositoriesRequest { + /** Represents an ImportAptArtifactsResponse. */ + class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { /** - * Constructs a new ListRepositoriesRequest. + * Constructs a new ImportAptArtifactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest); + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse); - /** ListRepositoriesRequest parent. */ - public parent: string; - - /** ListRepositoriesRequest pageSize. */ - public pageSize: number; + /** ImportAptArtifactsResponse aptArtifacts. */ + public aptArtifacts: google.devtools.artifactregistry.v1.IAptArtifact[]; - /** ListRepositoriesRequest pageToken. */ - public pageToken: string; + /** ImportAptArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo[]; /** - * Creates a new ListRepositoriesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListRepositoriesRequest instance + * @returns ImportAptArtifactsResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @param message ImportAptArtifactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. + * @param message ImportAptArtifactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRepositoriesRequest + * @returns ImportAptArtifactsResponse * @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.devtools.artifactregistry.v1.ListRepositoriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRepositoriesRequest + * @returns ImportAptArtifactsResponse * @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.devtools.artifactregistry.v1.ListRepositoriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; /** - * Verifies a ListRepositoriesRequest message. + * Verifies an ImportAptArtifactsResponse 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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRepositoriesRequest + * @returns ImportAptArtifactsResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsResponse; /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. - * @param message ListRepositoriesRequest + * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. + * @param message ImportAptArtifactsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRepositoriesRequest to JSON. + * Converts this ImportAptArtifactsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListRepositoriesResponse. */ - interface IListRepositoriesResponse { - - /** ListRepositoriesResponse repositories */ - repositories?: (google.devtools.artifactregistry.v1.IRepository[]|null); - - /** ListRepositoriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of an ImportAptArtifactsMetadata. */ + interface IImportAptArtifactsMetadata { } - /** Represents a ListRepositoriesResponse. */ - class ListRepositoriesResponse implements IListRepositoriesResponse { + /** Represents an ImportAptArtifactsMetadata. */ + class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { /** - * Constructs a new ListRepositoriesResponse. + * Constructs a new ImportAptArtifactsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse); - - /** ListRepositoriesResponse repositories. */ - public repositories: google.devtools.artifactregistry.v1.IRepository[]; - - /** ListRepositoriesResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata); /** - * Creates a new ListRepositoriesResponse instance using the specified properties. + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListRepositoriesResponse instance + * @returns ImportAptArtifactsMetadata instance */ - public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + public static create(properties?: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @param message ImportAptArtifactsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. + * @param message ImportAptArtifactsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListRepositoriesResponse + * @returns ImportAptArtifactsMetadata * @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.devtools.artifactregistry.v1.ListRepositoriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRepositoriesResponse + * @returns ImportAptArtifactsMetadata * @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.devtools.artifactregistry.v1.ListRepositoriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; /** - * Verifies a ListRepositoriesResponse message. + * Verifies an ImportAptArtifactsMetadata 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 ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRepositoriesResponse + * @returns ImportAptArtifactsMetadata */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata; /** - * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. - * @param message ListRepositoriesResponse + * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. + * @param message ImportAptArtifactsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRepositoriesResponse to JSON. + * Converts this ImportAptArtifactsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetRepositoryRequest. */ - interface IGetRepositoryRequest { + /** Properties of a DockerImage. */ + interface IDockerImage { - /** GetRepositoryRequest name */ + /** DockerImage name */ name?: (string|null); + + /** DockerImage uri */ + uri?: (string|null); + + /** DockerImage tags */ + tags?: (string[]|null); + + /** DockerImage imageSizeBytes */ + imageSizeBytes?: (number|Long|string|null); + + /** DockerImage uploadTime */ + uploadTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage mediaType */ + mediaType?: (string|null); + + /** DockerImage buildTime */ + buildTime?: (google.protobuf.ITimestamp|null); } - /** Represents a GetRepositoryRequest. */ - class GetRepositoryRequest implements IGetRepositoryRequest { + /** Represents a DockerImage. */ + class DockerImage implements IDockerImage { /** - * Constructs a new GetRepositoryRequest. + * Constructs a new DockerImage. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest); + constructor(properties?: google.devtools.artifactregistry.v1.IDockerImage); - /** GetRepositoryRequest name. */ + /** DockerImage name. */ public name: string; - /** - * Creates a new GetRepositoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRepositoryRequest instance + /** DockerImage uri. */ + public uri: string; + + /** DockerImage tags. */ + public tags: string[]; + + /** DockerImage imageSizeBytes. */ + public imageSizeBytes: (number|Long|string); + + /** DockerImage uploadTime. */ + public uploadTime?: (google.protobuf.ITimestamp|null); + + /** DockerImage mediaType. */ + public mediaType: string; + + /** DockerImage buildTime. */ + public buildTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DockerImage instance using the specified properties. + * @param [properties] Properties to set + * @returns DockerImage instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDockerImage): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @param message DockerImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * @param message DockerImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDockerImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DockerImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DockerImage + * @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.devtools.artifactregistry.v1.DockerImage; + + /** + * Decodes a DockerImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DockerImage + * @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.devtools.artifactregistry.v1.DockerImage; + + /** + * Verifies a DockerImage 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 DockerImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DockerImage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DockerImage; + + /** + * Creates a plain object from a DockerImage message. Also converts values to other types if specified. + * @param message DockerImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DockerImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DockerImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDockerImagesRequest. */ + interface IListDockerImagesRequest { + + /** ListDockerImagesRequest parent */ + parent?: (string|null); + + /** ListDockerImagesRequest pageSize */ + pageSize?: (number|null); + + /** ListDockerImagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDockerImagesRequest. */ + class ListDockerImagesRequest implements IListDockerImagesRequest { + + /** + * Constructs a new ListDockerImagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest); + + /** ListDockerImagesRequest parent. */ + public parent: string; + + /** ListDockerImagesRequest pageSize. */ + public pageSize: number; + + /** ListDockerImagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDockerImagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDockerImagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesRequest): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @param message ListDockerImagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @param message ListDockerImagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDockerImagesRequest + * @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.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDockerImagesRequest + * @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.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Verifies a ListDockerImagesRequest 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 ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDockerImagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesRequest; + + /** + * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. + * @param message ListDockerImagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDockerImagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDockerImagesResponse. */ + interface IListDockerImagesResponse { + + /** ListDockerImagesResponse dockerImages */ + dockerImages?: (google.devtools.artifactregistry.v1.IDockerImage[]|null); + + /** ListDockerImagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDockerImagesResponse. */ + class ListDockerImagesResponse implements IListDockerImagesResponse { + + /** + * Constructs a new ListDockerImagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse); + + /** ListDockerImagesResponse dockerImages. */ + public dockerImages: google.devtools.artifactregistry.v1.IDockerImage[]; + + /** ListDockerImagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDockerImagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDockerImagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListDockerImagesResponse): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @param message ListDockerImagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @param message ListDockerImagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListDockerImagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDockerImagesResponse + * @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.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDockerImagesResponse + * @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.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Verifies a ListDockerImagesResponse 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 ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDockerImagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListDockerImagesResponse; + + /** + * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. + * @param message ListDockerImagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListDockerImagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDockerImagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDockerImageRequest. */ + interface IGetDockerImageRequest { + + /** GetDockerImageRequest name */ + name?: (string|null); + } + + /** Represents a GetDockerImageRequest. */ + class GetDockerImageRequest implements IGetDockerImageRequest { + + /** + * Constructs a new GetDockerImageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest); + + /** GetDockerImageRequest name. */ + public name: string; + + /** + * Creates a new GetDockerImageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDockerImageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetDockerImageRequest): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @param message GetDockerImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @param message GetDockerImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetDockerImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDockerImageRequest + * @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.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDockerImageRequest + * @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.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Verifies a GetDockerImageRequest 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 GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDockerImageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetDockerImageRequest; + + /** + * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. + * @param message GetDockerImageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetDockerImageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDockerImageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Hash. */ + interface IHash { + + /** Hash type */ + type?: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType|null); + + /** Hash value */ + value?: (Uint8Array|string|null); + } + + /** Represents a Hash. */ + class Hash implements IHash { + + /** + * Constructs a new Hash. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IHash); + + /** Hash type. */ + public type: (google.devtools.artifactregistry.v1.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1.Hash.HashType); + + /** Hash value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Hash instance using the specified properties. + * @param [properties] Properties to set + * @returns Hash instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IHash): google.devtools.artifactregistry.v1.Hash; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Hash + * @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.devtools.artifactregistry.v1.Hash; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Hash + * @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.devtools.artifactregistry.v1.Hash; + + /** + * Verifies a Hash 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 Hash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hash + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Hash; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hash to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Hash { + + /** HashType enum. */ + enum HashType { + HASH_TYPE_UNSPECIFIED = 0, + SHA256 = 1, + MD5 = 2 + } + } + + /** Properties of a File. */ + interface IFile { + + /** File name */ + name?: (string|null); + + /** File sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** File hashes */ + hashes?: (google.devtools.artifactregistry.v1.IHash[]|null); + + /** File createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner */ + owner?: (string|null); + } + + /** Represents a File. */ + class File implements IFile { + + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IFile); + + /** File name. */ + public name: string; + + /** File sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** File hashes. */ + public hashes: google.devtools.artifactregistry.v1.IHash[]; + + /** File createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner. */ + public owner: string; + + /** + * Creates a new File instance using the specified properties. + * @param [properties] Properties to set + * @returns File instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IFile): google.devtools.artifactregistry.v1.File; + + /** + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @param message File message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a File message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns File + * @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.devtools.artifactregistry.v1.File; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns File + * @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.devtools.artifactregistry.v1.File; + + /** + * Verifies a File 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 File message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns File + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.File; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this File to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListFilesRequest. */ + interface IListFilesRequest { + + /** ListFilesRequest parent */ + parent?: (string|null); + + /** ListFilesRequest filter */ + filter?: (string|null); + + /** ListFilesRequest pageSize */ + pageSize?: (number|null); + + /** ListFilesRequest pageToken */ + pageToken?: (string|null); + + /** ListFilesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListFilesRequest. */ + class ListFilesRequest implements IListFilesRequest { + + /** + * Constructs a new ListFilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListFilesRequest); + + /** ListFilesRequest parent. */ + public parent: string; + + /** ListFilesRequest filter. */ + public filter: string; + + /** ListFilesRequest pageSize. */ + public pageSize: number; + + /** ListFilesRequest pageToken. */ + public pageToken: string; + + /** ListFilesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListFilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFilesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListFilesRequest): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @param message ListFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @param message ListFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesRequest + * @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.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesRequest + * @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.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Verifies a ListFilesRequest 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 ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesRequest; + + /** + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. + * @param message ListFilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListFilesResponse. */ + interface IListFilesResponse { + + /** ListFilesResponse files */ + files?: (google.devtools.artifactregistry.v1.IFile[]|null); + + /** ListFilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFilesResponse. */ + class ListFilesResponse implements IListFilesResponse { + + /** + * Constructs a new ListFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListFilesResponse); + + /** ListFilesResponse files. */ + public files: google.devtools.artifactregistry.v1.IFile[]; + + /** ListFilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFilesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListFilesResponse): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @param message ListFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @param message ListFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFilesResponse + * @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.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFilesResponse + * @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.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Verifies a ListFilesResponse 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 ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListFilesResponse; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @param message ListFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetFileRequest. */ + interface IGetFileRequest { + + /** GetFileRequest name */ + name?: (string|null); + } + + /** Represents a GetFileRequest. */ + class GetFileRequest implements IGetFileRequest { + + /** + * Constructs a new GetFileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetFileRequest); + + /** GetFileRequest name. */ + public name: string; + + /** + * Creates a new GetFileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFileRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetFileRequest): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @param message GetFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @param message GetFileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFileRequest + * @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.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFileRequest + * @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.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Verifies a GetFileRequest 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 GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFileRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetFileRequest; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @param message GetFileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Package. */ + interface IPackage { + + /** Package name */ + name?: (string|null); + + /** Package displayName */ + displayName?: (string|null); + + /** Package createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Package updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Package. */ + class Package implements IPackage { + + /** + * Constructs a new Package. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IPackage); + + /** Package name. */ + public name: string; + + /** Package displayName. */ + public displayName: string; + + /** Package createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Package updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Package instance using the specified properties. + * @param [properties] Properties to set + * @returns Package instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IPackage): google.devtools.artifactregistry.v1.Package; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Package message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Package + * @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.devtools.artifactregistry.v1.Package; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Package + * @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.devtools.artifactregistry.v1.Package; + + /** + * Verifies a Package 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 Package message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Package + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Package; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @param message Package + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Package to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPackagesRequest. */ + interface IListPackagesRequest { + + /** ListPackagesRequest parent */ + parent?: (string|null); + + /** ListPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPackagesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPackagesRequest. */ + class ListPackagesRequest implements IListPackagesRequest { + + /** + * Constructs a new ListPackagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest); + + /** ListPackagesRequest parent. */ + public parent: string; + + /** ListPackagesRequest pageSize. */ + public pageSize: number; + + /** ListPackagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesRequest): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @param message ListPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @param message ListPackagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesRequest + * @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.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesRequest + * @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.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Verifies a ListPackagesRequest 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 ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesRequest; + + /** + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. + * @param message ListPackagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListPackagesResponse. */ + interface IListPackagesResponse { + + /** ListPackagesResponse packages */ + packages?: (google.devtools.artifactregistry.v1.IPackage[]|null); + + /** ListPackagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPackagesResponse. */ + class ListPackagesResponse implements IListPackagesResponse { + + /** + * Constructs a new ListPackagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse); + + /** ListPackagesResponse packages. */ + public packages: google.devtools.artifactregistry.v1.IPackage[]; + + /** ListPackagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPackagesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListPackagesResponse): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @param message ListPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @param message ListPackagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPackagesResponse + * @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.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPackagesResponse + * @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.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Verifies a ListPackagesResponse 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 ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPackagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListPackagesResponse; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @param message ListPackagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPackagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetPackageRequest. */ + interface IGetPackageRequest { + + /** GetPackageRequest name */ + name?: (string|null); + } + + /** Represents a GetPackageRequest. */ + class GetPackageRequest implements IGetPackageRequest { + + /** + * Constructs a new GetPackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest); + + /** GetPackageRequest name. */ + public name: string; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetPackageRequest): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @param message GetPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @param message GetPackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPackageRequest + * @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.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPackageRequest + * @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.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Verifies a GetPackageRequest 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 GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetPackageRequest; + + /** + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * @param message GetPackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeletePackageRequest. */ + interface IDeletePackageRequest { + + /** DeletePackageRequest name */ + name?: (string|null); + } + + /** Represents a DeletePackageRequest. */ + class DeletePackageRequest implements IDeletePackageRequest { + + /** + * Constructs a new DeletePackageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest); + + /** DeletePackageRequest name. */ + public name: string; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePackageRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeletePackageRequest): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @param message DeletePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @param message DeletePackageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePackageRequest + * @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.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePackageRequest + * @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.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Verifies a DeletePackageRequest 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 DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePackageRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeletePackageRequest; + + /** + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * @param message DeletePackageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePackageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Repository. */ + interface IRepository { + + /** Repository mavenConfig */ + mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); + + /** Repository name */ + name?: (string|null); + + /** Repository format */ + format?: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format|null); + + /** Repository description */ + description?: (string|null); + + /** Repository labels */ + labels?: ({ [k: string]: string }|null); + + /** Repository createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents a Repository. */ + class Repository implements IRepository { + + /** + * Constructs a new Repository. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IRepository); + + /** Repository mavenConfig. */ + public mavenConfig?: (google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null); + + /** Repository name. */ + public name: string; + + /** Repository format. */ + public format: (google.devtools.artifactregistry.v1.Repository.Format|keyof typeof google.devtools.artifactregistry.v1.Repository.Format); + + /** Repository description. */ + public description: string; + + /** Repository labels. */ + public labels: { [k: string]: string }; + + /** Repository createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Repository updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Repository kmsKeyName. */ + public kmsKeyName: string; + + /** Repository formatConfig. */ + public formatConfig?: "mavenConfig"; + + /** + * Creates a new Repository instance using the specified properties. + * @param [properties] Properties to set + * @returns Repository instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IRepository): google.devtools.artifactregistry.v1.Repository; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @param message Repository message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Repository + * @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.devtools.artifactregistry.v1.Repository; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Repository + * @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.devtools.artifactregistry.v1.Repository; + + /** + * Verifies a Repository 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 Repository message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Repository + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @param message Repository + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Repository to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Repository { + + /** Properties of a MavenRepositoryConfig. */ + interface IMavenRepositoryConfig { + + /** MavenRepositoryConfig allowSnapshotOverwrites */ + allowSnapshotOverwrites?: (boolean|null); + + /** MavenRepositoryConfig versionPolicy */ + versionPolicy?: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null); + } + + /** Represents a MavenRepositoryConfig. */ + class MavenRepositoryConfig implements IMavenRepositoryConfig { + + /** + * Constructs a new MavenRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig); + + /** MavenRepositoryConfig allowSnapshotOverwrites. */ + public allowSnapshotOverwrites: boolean; + + /** MavenRepositoryConfig versionPolicy. */ + public versionPolicy: (google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy); + + /** + * Creates a new MavenRepositoryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MavenRepositoryConfig instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @param message MavenRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @param message MavenRepositoryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MavenRepositoryConfig + * @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.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MavenRepositoryConfig + * @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.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Verifies a MavenRepositoryConfig 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 MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MavenRepositoryConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig; + + /** + * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. + * @param message MavenRepositoryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MavenRepositoryConfig { + + /** VersionPolicy enum. */ + enum VersionPolicy { + VERSION_POLICY_UNSPECIFIED = 0, + RELEASE = 1, + SNAPSHOT = 2 + } + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + DOCKER = 1, + MAVEN = 2, + NPM = 3, + APT = 5, + YUM = 6, + PYTHON = 8 + } + } + + /** Properties of a ListRepositoriesRequest. */ + interface IListRepositoriesRequest { + + /** ListRepositoriesRequest parent */ + parent?: (string|null); + + /** ListRepositoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListRepositoriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListRepositoriesRequest. */ + class ListRepositoriesRequest implements IListRepositoriesRequest { + + /** + * Constructs a new ListRepositoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest); + + /** ListRepositoriesRequest parent. */ + public parent: string; + + /** ListRepositoriesRequest pageSize. */ + public pageSize: number; + + /** ListRepositoriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesRequest): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @param message ListRepositoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesRequest + * @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.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesRequest + * @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.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Verifies a ListRepositoriesRequest 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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesRequest; + + /** + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @param message ListRepositoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListRepositoriesResponse. */ + interface IListRepositoriesResponse { + + /** ListRepositoriesResponse repositories */ + repositories?: (google.devtools.artifactregistry.v1.IRepository[]|null); + + /** ListRepositoriesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListRepositoriesResponse. */ + class ListRepositoriesResponse implements IListRepositoriesResponse { + + /** + * Constructs a new ListRepositoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.devtools.artifactregistry.v1.IRepository[]; + + /** ListRepositoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRepositoriesResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListRepositoriesResponse): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @param message ListRepositoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListRepositoriesResponse + * @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.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListRepositoriesResponse + * @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.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Verifies a ListRepositoriesResponse 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 ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRepositoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListRepositoriesResponse; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @param message ListRepositoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetRepositoryRequest. */ + interface IGetRepositoryRequest { + + /** GetRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a GetRepositoryRequest. */ + class GetRepositoryRequest implements IGetRepositoryRequest { + + /** + * Constructs a new GetRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest); + + /** GetRepositoryRequest name. */ + public name: string; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @param message GetRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetRepositoryRequest + * @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.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetRepositoryRequest + * @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.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Verifies a GetRepositoryRequest 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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRepositoryRequest; + + /** + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @param message GetRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateRepositoryRequest. */ + interface ICreateRepositoryRequest { + + /** CreateRepositoryRequest parent */ + parent?: (string|null); + + /** CreateRepositoryRequest repositoryId */ + repositoryId?: (string|null); + + /** CreateRepositoryRequest repository */ + repository?: (google.devtools.artifactregistry.v1.IRepository|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @param message CreateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateRepositoryRequest + * @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.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateRepositoryRequest + * @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.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Verifies a CreateRepositoryRequest 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 CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateRepositoryRequest; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @param message CreateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateRepositoryRequest. */ + interface IUpdateRepositoryRequest { + + /** UpdateRepositoryRequest repository */ + repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** UpdateRepositoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateRepositoryRequest. */ + class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + + /** + * Constructs a new UpdateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1.IRepository|null); + + /** UpdateRepositoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @param message UpdateRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateRepositoryRequest + * @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.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateRepositoryRequest + * @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.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Verifies an UpdateRepositoryRequest 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 UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateRepositoryRequest; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @param message UpdateRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteRepositoryRequest. */ + interface IDeleteRepositoryRequest { + + /** DeleteRepositoryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteRepositoryRequest. */ + class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + + /** + * Constructs a new DeleteRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest); + + /** DeleteRepositoryRequest name. */ + public name: string; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteRepositoryRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @param message DeleteRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteRepositoryRequest + * @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.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteRepositoryRequest + * @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.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Verifies a DeleteRepositoryRequest 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 DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteRepositoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteRepositoryRequest; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @param message DeleteRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteRepositoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents an ArtifactRegistry */ + class ArtifactRegistry extends $protobuf.rpc.Service { + + /** + * Constructs a new ArtifactRegistry 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 ArtifactRegistry 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): ArtifactRegistry; + + /** + * Calls ListDockerImages. + * @param request ListDockerImagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDockerImagesResponse + */ + public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback): void; + + /** + * Calls ListDockerImages. + * @param request ListDockerImagesRequest message or plain object + * @returns Promise + */ + public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest): Promise; + + /** + * Calls GetDockerImage. + * @param request GetDockerImageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DockerImage + */ + public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback): void; + + /** + * Calls GetDockerImage. + * @param request GetDockerImageRequest message or plain object + * @returns Promise + */ + public getDockerImage(request: google.devtools.artifactregistry.v1.IGetDockerImageRequest): Promise; + + /** + * Calls ImportAptArtifacts. + * @param request ImportAptArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback): void; + + /** + * Calls ImportAptArtifacts. + * @param request ImportAptArtifactsRequest message or plain object + * @returns Promise + */ + public importAptArtifacts(request: google.devtools.artifactregistry.v1.IImportAptArtifactsRequest): Promise; + + /** + * Calls ImportYumArtifacts. + * @param request ImportYumArtifactsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback): void; + + /** + * Calls ImportYumArtifacts. + * @param request ImportYumArtifactsRequest message or plain object + * @returns Promise + */ + public importYumArtifacts(request: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): Promise; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + */ + public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest): Promise; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest): Promise; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. + * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.devtools.artifactregistry.v1.ICreateRepositoryRequest): Promise; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Repository + */ + public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.devtools.artifactregistry.v1.IUpdateRepositoryRequest): Promise; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.devtools.artifactregistry.v1.IDeleteRepositoryRequest): Promise; + + /** + * Calls ListPackages. + * @param request ListPackagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPackagesResponse + */ + public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback): void; + + /** + * Calls ListPackages. + * @param request ListPackagesRequest message or plain object + * @returns Promise + */ + public listPackages(request: google.devtools.artifactregistry.v1.IListPackagesRequest): Promise; + + /** + * Calls GetPackage. + * @param request GetPackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Package + */ + public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback): void; + + /** + * Calls GetPackage. + * @param request GetPackageRequest message or plain object + * @returns Promise + */ + public getPackage(request: google.devtools.artifactregistry.v1.IGetPackageRequest): Promise; + + /** + * Calls DeletePackage. + * @param request DeletePackageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback): void; + + /** + * Calls DeletePackage. + * @param request DeletePackageRequest message or plain object + * @returns Promise + */ + public deletePackage(request: google.devtools.artifactregistry.v1.IDeletePackageRequest): Promise; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + */ + public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback): void; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise + */ + public listVersions(request: google.devtools.artifactregistry.v1.IListVersionsRequest): Promise; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version + */ + public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback): void; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise + */ + public getVersion(request: google.devtools.artifactregistry.v1.IGetVersionRequest): Promise; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback): void; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise + */ + public deleteVersion(request: google.devtools.artifactregistry.v1.IDeleteVersionRequest): Promise; + + /** + * Calls ListFiles. + * @param request ListFilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFilesResponse + */ + public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback): void; + + /** + * Calls ListFiles. + * @param request ListFilesRequest message or plain object + * @returns Promise + */ + public listFiles(request: google.devtools.artifactregistry.v1.IListFilesRequest): Promise; + + /** + * Calls GetFile. + * @param request GetFileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and File + */ + public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback): void; + + /** + * Calls GetFile. + * @param request GetFileRequest message or plain object + * @returns Promise + */ + public getFile(request: google.devtools.artifactregistry.v1.IGetFileRequest): Promise; + + /** + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTagsResponse + */ + public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback): void; + + /** + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @returns Promise + */ + public listTags(request: google.devtools.artifactregistry.v1.IListTagsRequest): Promise; + + /** + * Calls GetTag. + * @param request GetTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback): void; + + /** + * Calls GetTag. + * @param request GetTagRequest message or plain object + * @returns Promise + */ + public getTag(request: google.devtools.artifactregistry.v1.IGetTagRequest): Promise; + + /** + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback): void; + + /** + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @returns Promise + */ + public createTag(request: google.devtools.artifactregistry.v1.ICreateTagRequest): Promise; + + /** + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Tag + */ + public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback): void; + + /** + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @returns Promise + */ + public updateTag(request: google.devtools.artifactregistry.v1.IUpdateTagRequest): Promise; + + /** + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback): void; + + /** + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @returns Promise + */ + public deleteTag(request: google.devtools.artifactregistry.v1.IDeleteTagRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls GetProjectSettings. + * @param request GetProjectSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProjectSettings + */ + public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback): void; + + /** + * Calls GetProjectSettings. + * @param request GetProjectSettingsRequest message or plain object + * @returns Promise + */ + public getProjectSettings(request: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): Promise; + + /** + * Calls UpdateProjectSettings. + * @param request UpdateProjectSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProjectSettings + */ + public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback): void; + + /** + * Calls UpdateProjectSettings. + * @param request UpdateProjectSettingsRequest message or plain object + * @returns Promise + */ + public updateProjectSettings(request: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): Promise; + } + + namespace ArtifactRegistry { + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listDockerImages}. + * @param error Error, if any + * @param [response] ListDockerImagesResponse + */ + type ListDockerImagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListDockerImagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getDockerImage}. + * @param error Error, if any + * @param [response] DockerImage + */ + type GetDockerImageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.DockerImage) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#importAptArtifacts}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportAptArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#importYumArtifacts}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportYumArtifactsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#createRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteRepository}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listPackages}. + * @param error Error, if any + * @param [response] ListPackagesResponse + */ + type ListPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListPackagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getPackage}. + * @param error Error, if any + * @param [response] Package + */ + type GetPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Package) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deletePackage}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePackageCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listVersions}. + * @param error Error, if any + * @param [response] ListVersionsResponse + */ + type ListVersionsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListVersionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getVersion}. + * @param error Error, if any + * @param [response] Version + */ + type GetVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Version) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteVersion}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listFiles}. + * @param error Error, if any + * @param [response] ListFilesResponse + */ + type ListFilesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListFilesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getFile}. + * @param error Error, if any + * @param [response] File + */ + type GetFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.File) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listTags}. + * @param error Error, if any + * @param [response] ListTagsResponse + */ + type ListTagsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListTagsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getTag}. + * @param error Error, if any + * @param [response] Tag + */ + type GetTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#createTag}. + * @param error Error, if any + * @param [response] Tag + */ + type CreateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateTag}. + * @param error Error, if any + * @param [response] Tag + */ + type UpdateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteTag}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type GetProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type UpdateProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ProjectSettings) => void; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IOperationMetadata); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IOperationMetadata): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @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.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @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.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProjectSettings. */ + interface IProjectSettings { + + /** ProjectSettings name */ + name?: (string|null); + + /** ProjectSettings legacyRedirectionState */ + legacyRedirectionState?: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null); + } + + /** Represents a ProjectSettings. */ + class ProjectSettings implements IProjectSettings { + + /** + * Constructs a new ProjectSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IProjectSettings); + + /** ProjectSettings name. */ + public name: string; + + /** ProjectSettings legacyRedirectionState. */ + public legacyRedirectionState: (google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState); + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectSettings instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IProjectSettings): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectSettings + * @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.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectSettings + * @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.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Verifies a ProjectSettings 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 ProjectSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectSettings + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ProjectSettings; + + /** + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. + * @param message ProjectSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ProjectSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProjectSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ProjectSettings { + + /** RedirectionState enum. */ + enum RedirectionState { + REDIRECTION_STATE_UNSPECIFIED = 0, + REDIRECTION_FROM_GCR_IO_DISABLED = 1, + REDIRECTION_FROM_GCR_IO_ENABLED = 2, + REDIRECTION_FROM_GCR_IO_FINALIZED = 3 + } + } + + /** Properties of a GetProjectSettingsRequest. */ + interface IGetProjectSettingsRequest { + + /** GetProjectSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetProjectSettingsRequest. */ + class GetProjectSettingsRequest implements IGetProjectSettingsRequest { + + /** + * Constructs a new GetProjectSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest); + + /** GetProjectSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetProjectSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProjectSettingsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @param message GetProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @param message GetProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProjectSettingsRequest + * @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.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProjectSettingsRequest + * @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.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Verifies a GetProjectSettingsRequest 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 GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProjectSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetProjectSettingsRequest; + + /** + * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. + * @param message GetProjectSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProjectSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateProjectSettingsRequest. */ + interface IUpdateProjectSettingsRequest { + + /** UpdateProjectSettingsRequest projectSettings */ + projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); + + /** UpdateProjectSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateProjectSettingsRequest. */ + class UpdateProjectSettingsRequest implements IUpdateProjectSettingsRequest { + + /** + * Constructs a new UpdateProjectSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest); + + /** UpdateProjectSettingsRequest projectSettings. */ + public projectSettings?: (google.devtools.artifactregistry.v1.IProjectSettings|null); + + /** UpdateProjectSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateProjectSettingsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @param message UpdateProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @param message UpdateProjectSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateProjectSettingsRequest + * @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.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateProjectSettingsRequest + * @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.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Verifies an UpdateProjectSettingsRequest 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 UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateProjectSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest; + + /** + * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateProjectSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateProjectSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Tag. */ + interface ITag { + + /** Tag name */ + name?: (string|null); + + /** Tag version */ + version?: (string|null); + } + + /** Represents a Tag. */ + class Tag implements ITag { + + /** + * Constructs a new Tag. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ITag); + + /** Tag name. */ + public name: string; + + /** Tag version. */ + public version: string; + + /** + * Creates a new Tag instance using the specified properties. + * @param [properties] Properties to set + * @returns Tag instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ITag): google.devtools.artifactregistry.v1.Tag; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tag + * @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.devtools.artifactregistry.v1.Tag; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tag + * @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.devtools.artifactregistry.v1.Tag; + + /** + * Verifies a Tag 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 Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Tag; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @param message Tag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTagsRequest. */ + interface IListTagsRequest { + + /** ListTagsRequest parent */ + parent?: (string|null); + + /** ListTagsRequest filter */ + filter?: (string|null); + + /** ListTagsRequest pageSize */ + pageSize?: (number|null); + + /** ListTagsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTagsRequest. */ + class ListTagsRequest implements IListTagsRequest { + + /** + * Constructs a new ListTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListTagsRequest); + + /** ListTagsRequest parent. */ + public parent: string; + + /** ListTagsRequest filter. */ + public filter: string; + + /** ListTagsRequest pageSize. */ + public pageSize: number; + + /** ListTagsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListTagsRequest): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsRequest + * @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.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsRequest + * @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.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Verifies a ListTagsRequest 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 ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsRequest; + + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @param message ListTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTagsResponse. */ + interface IListTagsResponse { + + /** ListTagsResponse tags */ + tags?: (google.devtools.artifactregistry.v1.ITag[]|null); + + /** ListTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTagsResponse. */ + class ListTagsResponse implements IListTagsResponse { + + /** + * Constructs a new ListTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListTagsResponse); + + /** ListTagsResponse tags. */ + public tags: google.devtools.artifactregistry.v1.ITag[]; + + /** ListTagsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListTagsResponse): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagsResponse + * @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.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagsResponse + * @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.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Verifies a ListTagsResponse 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 ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListTagsResponse; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @param message ListTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetTagRequest. */ + interface IGetTagRequest { + + /** GetTagRequest name */ + name?: (string|null); + } + + /** Represents a GetTagRequest. */ + class GetTagRequest implements IGetTagRequest { + + /** + * Constructs a new GetTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetTagRequest); + + /** GetTagRequest name. */ + public name: string; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetTagRequest): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTagRequest + * @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.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTagRequest + * @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.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Verifies a GetTagRequest 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 GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetTagRequest; + + /** + * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. + * @param message GetTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTagRequest. */ + interface ICreateTagRequest { + + /** CreateTagRequest parent */ + parent?: (string|null); + + /** CreateTagRequest tagId */ + tagId?: (string|null); + + /** CreateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1.ITag|null); + } + + /** Represents a CreateTagRequest. */ + class CreateTagRequest implements ICreateTagRequest { + + /** + * Constructs a new CreateTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest); + + /** CreateTagRequest parent. */ + public parent: string; + + /** CreateTagRequest tagId. */ + public tagId: string; + + /** CreateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.ICreateTagRequest): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTagRequest + * @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.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTagRequest + * @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.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Verifies a CreateTagRequest 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 CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.CreateTagRequest; + + /** + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @param message CreateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateTagRequest. */ + interface IUpdateTagRequest { + + /** UpdateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** UpdateTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateTagRequest. */ + class UpdateTagRequest implements IUpdateTagRequest { + + /** + * Constructs a new UpdateTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest); + + /** UpdateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1.ITag|null); + + /** UpdateTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IUpdateTagRequest): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @param message UpdateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTagRequest + * @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.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTagRequest + * @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.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Verifies an UpdateTagRequest 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.UpdateTagRequest; + + /** + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @param message UpdateTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteTagRequest. */ + interface IDeleteTagRequest { + + /** DeleteTagRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTagRequest. */ + class DeleteTagRequest implements IDeleteTagRequest { + + /** + * Constructs a new DeleteTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest); + + /** DeleteTagRequest name. */ + public name: string; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTagRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteTagRequest): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @param message DeleteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTagRequest + * @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.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTagRequest + * @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.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Verifies a DeleteTagRequest 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 DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteTagRequest; + + /** + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @param message DeleteTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** VersionView enum. */ + enum VersionView { + VERSION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + + /** Properties of a Version. */ + interface IVersion { + + /** Version name */ + name?: (string|null); + + /** Version description */ + description?: (string|null); + + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags */ + relatedTags?: (google.devtools.artifactregistry.v1.ITag[]|null); + + /** Version metadata */ + metadata?: (google.protobuf.IStruct|null); + } + + /** Represents a Version. */ + class Version implements IVersion { + + /** + * Constructs a new Version. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IVersion); + + /** Version name. */ + public name: string; + + /** Version description. */ + public description: string; + + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags. */ + public relatedTags: google.devtools.artifactregistry.v1.ITag[]; + + /** Version metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** + * Creates a new Version instance using the specified properties. + * @param [properties] Properties to set + * @returns Version instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IVersion): google.devtools.artifactregistry.v1.Version; + + /** + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Version + * @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.devtools.artifactregistry.v1.Version; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Version + * @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.devtools.artifactregistry.v1.Version; + + /** + * Verifies a Version 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 Version message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Version + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.Version; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Version to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { + + /** ListVersionsRequest parent */ + parent?: (string|null); + + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListVersionsRequest view */ + view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); + + /** ListVersionsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { + + /** + * Constructs a new ListVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest); + + /** ListVersionsRequest parent. */ + public parent: string; + + /** ListVersionsRequest pageSize. */ + public pageSize: number; + + /** ListVersionsRequest pageToken. */ + public pageToken: string; + + /** ListVersionsRequest view. */ + public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); + + /** ListVersionsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsRequest): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsRequest + * @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.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsRequest + * @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.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Verifies a ListVersionsRequest 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 ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsRequest; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { + + /** ListVersionsResponse versions */ + versions?: (google.devtools.artifactregistry.v1.IVersion[]|null); + + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { + + /** + * Constructs a new ListVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse); + + /** ListVersionsResponse versions. */ + public versions: google.devtools.artifactregistry.v1.IVersion[]; + + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IListVersionsResponse): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsResponse + * @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.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsResponse + * @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.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Verifies a ListVersionsResponse 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 ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ListVersionsResponse; + + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @param message ListVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { + + /** GetVersionRequest name */ + name?: (string|null); + + /** GetVersionRequest view */ + view?: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView|null); + } + + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { + + /** + * Constructs a new GetVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest); + + /** GetVersionRequest name. */ + public name: string; + + /** GetVersionRequest view. */ + public view: (google.devtools.artifactregistry.v1.VersionView|keyof typeof google.devtools.artifactregistry.v1.VersionView); + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IGetVersionRequest): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVersionRequest + * @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.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVersionRequest + * @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.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Verifies a GetVersionRequest 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 GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetVersionRequest; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { + + /** DeleteVersionRequest name */ + name?: (string|null); + + /** DeleteVersionRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { + + /** + * Constructs a new DeleteVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest); + + /** DeleteVersionRequest name. */ + public name: string; + + /** DeleteVersionRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVersionRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IDeleteVersionRequest): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVersionRequest + * @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.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVersionRequest + * @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.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Verifies a DeleteVersionRequest 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 DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.DeleteVersionRequest; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a YumArtifact. */ + interface IYumArtifact { + + /** YumArtifact name */ + name?: (string|null); + + /** YumArtifact packageName */ + packageName?: (string|null); + + /** YumArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType|null); + + /** YumArtifact architecture */ + architecture?: (string|null); + } + + /** Represents a YumArtifact. */ + class YumArtifact implements IYumArtifact { + + /** + * Constructs a new YumArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IYumArtifact); + + /** YumArtifact name. */ + public name: string; + + /** YumArtifact packageName. */ + public packageName: string; + + /** YumArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1.YumArtifact.PackageType); + + /** YumArtifact architecture. */ + public architecture: string; + + /** + * Creates a new YumArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns YumArtifact instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IYumArtifact): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @param message YumArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @param message YumArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YumArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YumArtifact + * @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.devtools.artifactregistry.v1.YumArtifact; + + /** + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YumArtifact + * @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.devtools.artifactregistry.v1.YumArtifact; + + /** + * Verifies a YumArtifact 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 YumArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YumArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.YumArtifact; + + /** + * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. + * @param message YumArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YumArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace YumArtifact { + + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } + + /** Properties of an ImportYumArtifactsGcsSource. */ + interface IImportYumArtifactsGcsSource { + + /** ImportYumArtifactsGcsSource uris */ + uris?: (string[]|null); + + /** ImportYumArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); + } + + /** Represents an ImportYumArtifactsGcsSource. */ + class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource); + + /** ImportYumArtifactsGcsSource uris. */ + public uris: string[]; + + /** ImportYumArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsGcsSource instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @param message ImportYumArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @param message ImportYumArtifactsGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsGcsSource + * @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.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsGcsSource + * @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.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Verifies an ImportYumArtifactsGcsSource 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 ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource; + + /** + * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. + * @param message ImportYumArtifactsGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportYumArtifactsRequest. */ + interface IImportYumArtifactsRequest { + + /** ImportYumArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent */ + parent?: (string|null); + } + + /** Represents an ImportYumArtifactsRequest. */ + class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { + + /** + * Constructs a new ImportYumArtifactsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest); + + /** ImportYumArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsRequest parent. */ + public parent: string; + + /** ImportYumArtifactsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsRequest instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @param message ImportYumArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @param message ImportYumArtifactsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsRequest + * @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.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsRequest + * @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.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Verifies an ImportYumArtifactsRequest 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 ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsRequest; + + /** + * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. + * @param message ImportYumArtifactsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportYumArtifactsErrorInfo. */ + interface IImportYumArtifactsErrorInfo { + + /** ImportYumArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an ImportYumArtifactsErrorInfo. */ + class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo); + + /** ImportYumArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null); + + /** ImportYumArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportYumArtifactsErrorInfo source. */ + public source?: "gcsSource"; + + /** + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsErrorInfo instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @param message ImportYumArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @param message ImportYumArtifactsErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsErrorInfo + * @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.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsErrorInfo + * @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.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; + + /** + * Verifies an ImportYumArtifactsErrorInfo 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 ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsErrorInfo */ - public static create(properties?: google.devtools.artifactregistry.v1.IGetRepositoryRequest): google.devtools.artifactregistry.v1.GetRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo; /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode + * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. + * @param message ImportYumArtifactsErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportYumArtifactsErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportYumArtifactsResponse. */ + interface IImportYumArtifactsResponse { + + /** ImportYumArtifactsResponse yumArtifacts */ + yumArtifacts?: (google.devtools.artifactregistry.v1.IYumArtifact[]|null); + + /** ImportYumArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]|null); + } + + /** Represents an ImportYumArtifactsResponse. */ + class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { + + /** + * Constructs a new ImportYumArtifactsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse); + + /** ImportYumArtifactsResponse yumArtifacts. */ + public yumArtifacts: google.devtools.artifactregistry.v1.IYumArtifact[]; + + /** ImportYumArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo[]; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsResponse instance + */ + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; + + /** + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @param message ImportYumArtifactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @param message ImportYumArtifactsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetRepositoryRequest + * @returns ImportYumArtifactsResponse * @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.devtools.artifactregistry.v1.GetRepositoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRepositoryRequest + * @returns ImportYumArtifactsResponse * @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.devtools.artifactregistry.v1.GetRepositoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; /** - * Verifies a GetRepositoryRequest message. + * Verifies an ImportYumArtifactsResponse 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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRepositoryRequest + * @returns ImportYumArtifactsResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.GetRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsResponse; /** - * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. - * @param message GetRepositoryRequest + * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. + * @param message ImportYumArtifactsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.artifactregistry.v1.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRepositoryRequest to JSON. + * Converts this ImportYumArtifactsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an ArtifactRegistry */ - class ArtifactRegistry extends $protobuf.rpc.Service { + /** Properties of an ImportYumArtifactsMetadata. */ + interface IImportYumArtifactsMetadata { + } - /** - * Constructs a new ArtifactRegistry 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); + /** Represents an ImportYumArtifactsMetadata. */ + class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { /** - * Creates new ArtifactRegistry 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. + * Constructs a new ImportYumArtifactsMetadata. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ArtifactRegistry; + constructor(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata); /** - * Calls ListDockerImages. - * @param request ListDockerImagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDockerImagesResponse + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportYumArtifactsMetadata instance */ - public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback): void; + public static create(properties?: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; /** - * Calls ListDockerImages. - * @param request ListDockerImagesRequest message or plain object - * @returns Promise + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listDockerImages(request: google.devtools.artifactregistry.v1.IListDockerImagesRequest): Promise; + public static encode(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListRepositories. - * @param request ListRepositoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback): void; + public static encodeDelimited(message: google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListRepositories. - * @param request ListRepositoriesRequest message or plain object - * @returns Promise + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listRepositories(request: google.devtools.artifactregistry.v1.IListRepositoriesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; /** - * Calls GetRepository. - * @param request GetRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Repository + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; /** - * Calls GetRepository. - * @param request GetRepositoryRequest message or plain object - * @returns Promise + * Verifies an ImportYumArtifactsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getRepository(request: google.devtools.artifactregistry.v1.IGetRepositoryRequest): Promise; - } - - namespace ArtifactRegistry { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listDockerImages}. - * @param error Error, if any - * @param [response] ListDockerImagesResponse + * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportYumArtifactsMetadata */ - type ListDockerImagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListDockerImagesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata; /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listRepositories}. - * @param error Error, if any - * @param [response] ListRepositoriesResponse + * Creates a plain object from an ImportYumArtifactsMetadata message. Also converts values to other types if specified. + * @param message ImportYumArtifactsMetadata + * @param [options] Conversion options + * @returns Plain object */ - type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.ListRepositoriesResponse) => void; + public static toObject(message: google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getRepository}. - * @param error Error, if any - * @param [response] Repository + * Converts this ImportYumArtifactsMetadata to JSON. + * @returns JSON object */ - type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1.Repository) => void; + public toJSON(): { [k: string]: any }; } } @@ -9714,53 +14503,149 @@ export namespace google { */ public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - /** - * Verifies an Annotation 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); + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Verifies an Any 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 plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } /** Properties of a Timestamp. */ @@ -9859,675 +14744,685 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Any value */ - value?: (Uint8Array|string|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Any. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; + constructor(properties?: google.protobuf.IFieldMask); - /** Any value. */ - public value: (Uint8Array|string); + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Any instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies an Any message. + * Verifies a FieldMask 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 Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Properties of a Struct. */ + interface IStruct { - /** Duration nanos */ - nanos?: (number|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new Duration. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); + constructor(properties?: google.protobuf.IStruct); - /** Duration nanos. */ - public nanos: number; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @returns Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies a Duration message. + * Verifies a Struct message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new Empty. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a new Empty instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @returns Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies an Empty message. + * Verifies a Value 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 Empty message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } - /** FieldMask paths */ - paths?: (string[]|null); + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new FieldMask. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.protobuf.IListValue); - /** FieldMask paths. */ - public paths: string[]; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies a FieldMask message. + * Verifies a ListValue 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Struct. */ - interface IStruct { + /** Properties of a Duration. */ + interface IDuration { - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Struct. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.protobuf.IDuration); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Struct instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Struct instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Struct + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Struct message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { + public static verify(message: { [k: string]: any }): (string|null); /** - * Constructs a new Value. - * @param [properties] Properties to set + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - /** Value stringValue. */ - public stringValue?: (string|null); + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Value boolValue. */ - public boolValue?: (boolean|null); + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + /** Properties of an Empty. */ + interface IEmpty { + } - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** Represents an Empty. */ + class Empty implements IEmpty { - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new Value instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns Value instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Value + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Value + * @returns Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a Value message. + * Verifies an Empty 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 Value message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } + /** Namespace rpc. */ + namespace rpc { - /** Properties of a ListValue. */ - interface IListValue { + /** Properties of a Status. */ + interface IStatus { - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new ListValue. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); + constructor(properties?: google.rpc.IStatus); - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns ListValue instance + * @returns Status instance */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Status message. Does not implicitly {@link google.rpc.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.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.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.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListValue message from the specified reader or buffer. + * 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 ListValue + * @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.protobuf.ListValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListValue + * @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.protobuf.ListValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a ListValue message. + * 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 ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * 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.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -10540,1096 +15435,1096 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy etag */ - etag?: (Uint8Array|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { /** - * Constructs a new Policy. - * @param [properties] Properties to set + * Constructs a new IAMPolicy service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Policy etag. */ - public etag: (Uint8Array|string); + /** + * Creates new IAMPolicy 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): IAMPolicy; /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy + * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Converts this Policy to JSON. - * @returns JSON object + * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse */ - public toJSON(): { [k: string]: any }; + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; } - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { - /** Binding members */ - members?: (string[]|null); + /** SetIamPolicyRequest resource */ + resource?: (string|null); - /** Binding condition */ - condition?: (google.type.IExpr|null); + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); } - /** Represents a Binding. */ - class Binding implements IBinding { + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { /** - * Constructs a new Binding. + * Constructs a new SetIamPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - /** Binding members. */ - public members: string[]; + /** SetIamPolicyRequest resource. */ + public resource: string; - /** Binding condition. */ - public condition?: (google.type.IExpr|null); + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); /** - * Creates a new Binding instance using the specified properties. + * Creates a new SetIamPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Binding instance + * @returns SetIamPolicyRequest instance */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Binding message from the specified reader or buffer. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Binding + * @returns SetIamPolicyRequest * @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.iam.v1.Binding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; /** - * Decodes a Binding message from the specified reader or buffer, length delimited. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Binding + * @returns SetIamPolicyRequest * @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.iam.v1.Binding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; /** - * Verifies a Binding message. + * Verifies a SetIamPolicyRequest 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 Binding message from a plain object. Also converts values to their respective internal types. + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Binding + * @returns SetIamPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Binding to JSON. + * Converts this SetIamPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + /** GetIamPolicyRequest resource */ + resource?: (string|null); - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); } - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { /** - * Constructs a new PolicyDelta. + * Constructs a new GetIamPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IPolicyDelta); + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; + /** GetIamPolicyRequest resource. */ + public resource: string; - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); /** - * Creates a new PolicyDelta instance using the specified properties. + * Creates a new GetIamPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PolicyDelta instance + * @returns GetIamPolicyRequest instance */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PolicyDelta message from the specified reader or buffer. + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PolicyDelta + * @returns GetIamPolicyRequest * @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.iam.v1.PolicyDelta; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PolicyDelta + * @returns GetIamPolicyRequest * @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.iam.v1.PolicyDelta; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; /** - * Verifies a PolicyDelta message. + * Verifies a GetIamPolicyRequest 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 PolicyDelta message from a plain object. Also converts values to their respective internal types. + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PolicyDelta + * @returns GetIamPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PolicyDelta to JSON. + * Converts this GetIamPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { - /** BindingDelta member */ - member?: (string|null); + /** TestIamPermissionsRequest resource */ + resource?: (string|null); - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); } - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { /** - * Constructs a new BindingDelta. + * Constructs a new TestIamPermissionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - /** BindingDelta member. */ - public member: string; + /** TestIamPermissionsRequest resource. */ + public resource: string; - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; /** - * Creates a new BindingDelta instance using the specified properties. + * Creates a new TestIamPermissionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BindingDelta instance + * @returns TestIamPermissionsRequest instance */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BindingDelta message from the specified reader or buffer. + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BindingDelta + * @returns TestIamPermissionsRequest * @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.iam.v1.BindingDelta; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BindingDelta + * @returns TestIamPermissionsRequest * @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.iam.v1.BindingDelta; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; /** - * Verifies a BindingDelta message. + * Verifies a TestIamPermissionsRequest 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 BindingDelta message from a plain object. Also converts values to their respective internal types. + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BindingDelta + * @returns TestIamPermissionsRequest */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BindingDelta to JSON. + * Converts this TestIamPermissionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { - /** AuditConfigDelta logType */ - logType?: (string|null); + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); } - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { /** - * Constructs a new AuditConfigDelta. + * Constructs a new TestIamPermissionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - /** AuditConfigDelta logType. */ - public logType: string; + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; /** - * Creates a new AuditConfigDelta instance using the specified properties. + * Creates a new TestIamPermissionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AuditConfigDelta instance + * @returns TestIamPermissionsResponse instance */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AuditConfigDelta + * @returns TestIamPermissionsResponse * @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.iam.v1.AuditConfigDelta; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta + * @returns TestIamPermissionsResponse * @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.iam.v1.AuditConfigDelta; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; /** - * Verifies an AuditConfigDelta message. + * Verifies a TestIamPermissionsResponse 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AuditConfigDelta + * @returns TestIamPermissionsResponse */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AuditConfigDelta to JSON. + * Converts this TestIamPermissionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AuditConfigDelta { + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); } - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { /** - * Constructs a new IAMPolicy service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.iam.v1.IGetPolicyOptions); - /** - * Creates new IAMPolicy 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): IAMPolicy; + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; /** - * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Converts this GetPolicyOptions to JSON. + * @returns JSON object */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { + /** Properties of a Policy. */ + interface IPolicy { - /** SetIamPolicyRequest resource */ - resource?: (string|null); + /** Policy version */ + version?: (number|null); - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - } + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { + /** Policy etag */ + etag?: (Uint8Array|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { /** - * Constructs a new SetIamPolicyRequest. + * Constructs a new Policy. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + constructor(properties?: google.iam.v1.IPolicy); - /** SetIamPolicyRequest resource. */ - public resource: string; + /** Policy version. */ + public version: number; - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy etag. */ + public etag: (Uint8Array|string); /** - * Creates a new SetIamPolicyRequest instance using the specified properties. + * Creates a new Policy instance using the specified properties. * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance + * @returns Policy instance */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * Decodes a Policy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest + * @returns Policy * @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.iam.v1.SetIamPolicyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a Policy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest + * @returns Policy * @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.iam.v1.SetIamPolicyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; /** - * Verifies a SetIamPolicyRequest message. + * Verifies a Policy 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 SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Policy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetIamPolicyRequest + * @returns Policy */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetIamPolicyRequest to JSON. + * Converts this Policy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { + /** Properties of a Binding. */ + interface IBinding { - /** GetIamPolicyRequest resource */ - resource?: (string|null); + /** Binding role */ + role?: (string|null); - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); } - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { + /** Represents a Binding. */ + class Binding implements IBinding { /** - * Constructs a new GetIamPolicyRequest. + * Constructs a new Binding. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + constructor(properties?: google.iam.v1.IBinding); - /** GetIamPolicyRequest resource. */ - public resource: string; + /** Binding role. */ + public role: string; - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); /** - * Creates a new GetIamPolicyRequest instance using the specified properties. + * Creates a new Binding instance using the specified properties. * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance + * @returns Binding instance */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * Decodes a Binding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest + * @returns Binding * @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.iam.v1.GetIamPolicyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a Binding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest + * @returns Binding * @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.iam.v1.GetIamPolicyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; /** - * Verifies a GetIamPolicyRequest message. + * Verifies a Binding 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 GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Binding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetIamPolicyRequest + * @returns Binding */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetIamPolicyRequest to JSON. + * Converts this Binding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { - /** TestIamPermissionsRequest resource */ - resource?: (string|null); + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); } - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { /** - * Constructs a new TestIamPermissionsRequest. + * Constructs a new PolicyDelta. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + constructor(properties?: google.iam.v1.IPolicyDelta); - /** TestIamPermissionsRequest resource. */ - public resource: string; + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. + * Creates a new PolicyDelta instance using the specified properties. * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance + * @returns PolicyDelta instance */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * Decodes a PolicyDelta message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest + * @returns PolicyDelta * @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.iam.v1.TestIamPermissionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest + * @returns PolicyDelta * @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.iam.v1.TestIamPermissionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; /** - * Verifies a TestIamPermissionsRequest message. + * Verifies a PolicyDelta 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 TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TestIamPermissionsRequest + * @returns PolicyDelta */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TestIamPermissionsRequest to JSON. + * Converts this PolicyDelta to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { + /** Properties of a BindingDelta. */ + interface IBindingDelta { - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); } - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { /** - * Constructs a new TestIamPermissionsResponse. + * Constructs a new BindingDelta. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + constructor(properties?: google.iam.v1.IBindingDelta); - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. + * Creates a new BindingDelta instance using the specified properties. * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance + * @returns BindingDelta instance */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * Decodes a BindingDelta message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse + * @returns BindingDelta * @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.iam.v1.TestIamPermissionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse + * @returns BindingDelta * @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.iam.v1.TestIamPermissionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; /** - * Verifies a TestIamPermissionsResponse message. + * Verifies a BindingDelta 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 TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TestIamPermissionsResponse + * @returns BindingDelta */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TestIamPermissionsResponse to JSON. + * Converts this BindingDelta to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { + namespace BindingDelta { - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } } - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { /** - * Constructs a new GetPolicyOptions. + * Constructs a new AuditConfigDelta. * @param [properties] Properties to set */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); + constructor(properties?: google.iam.v1.IAuditConfigDelta); - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; /** - * Creates a new GetPolicyOptions instance using the specified properties. + * Creates a new AuditConfigDelta instance using the specified properties. * @param [properties] Properties to set - * @returns GetPolicyOptions instance + * @returns AuditConfigDelta instance */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. + * Decodes an AuditConfigDelta message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPolicyOptions + * @returns AuditConfigDelta * @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.iam.v1.GetPolicyOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions + * @returns AuditConfigDelta * @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.iam.v1.GetPolicyOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; /** - * Verifies a GetPolicyOptions message. + * Verifies an AuditConfigDelta 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 GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPolicyOptions + * @returns AuditConfigDelta */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPolicyOptions to JSON. + * Converts this AuditConfigDelta to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } } } @@ -12660,110 +17555,4 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.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.rpc.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.rpc.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.rpc.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.rpc.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.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } } diff --git a/packages/google-devtools-artifactregistry/protos/protos.js b/packages/google-devtools-artifactregistry/protos/protos.js index f16cbbbf317..3311b4e9851 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.js +++ b/packages/google-devtools-artifactregistry/protos/protos.js @@ -66,31 +66,29 @@ */ var v1 = {}; - v1.DockerImage = (function() { + v1.AptArtifact = (function() { /** - * Properties of a DockerImage. + * Properties of an AptArtifact. * @memberof google.devtools.artifactregistry.v1 - * @interface IDockerImage - * @property {string|null} [name] DockerImage name - * @property {string|null} [uri] DockerImage uri - * @property {Array.|null} [tags] DockerImage tags - * @property {number|Long|null} [imageSizeBytes] DockerImage imageSizeBytes - * @property {google.protobuf.ITimestamp|null} [uploadTime] DockerImage uploadTime - * @property {string|null} [mediaType] DockerImage mediaType - * @property {google.protobuf.ITimestamp|null} [buildTime] DockerImage buildTime + * @interface IAptArtifact + * @property {string|null} [name] AptArtifact name + * @property {string|null} [packageName] AptArtifact packageName + * @property {google.devtools.artifactregistry.v1.AptArtifact.PackageType|null} [packageType] AptArtifact packageType + * @property {string|null} [architecture] AptArtifact architecture + * @property {string|null} [component] AptArtifact component + * @property {Uint8Array|null} [controlFile] AptArtifact controlFile */ /** - * Constructs a new DockerImage. + * Constructs a new AptArtifact. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a DockerImage. - * @implements IDockerImage + * @classdesc Represents an AptArtifact. + * @implements IAptArtifact * @constructor - * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set */ - function DockerImage(properties) { - this.tags = []; + function AptArtifact(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98,131 +96,120 @@ } /** - * DockerImage name. + * AptArtifact name. * @member {string} name - * @memberof google.devtools.artifactregistry.v1.DockerImage - * @instance - */ - DockerImage.prototype.name = ""; - - /** - * DockerImage uri. - * @member {string} uri - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.uri = ""; + AptArtifact.prototype.name = ""; /** - * DockerImage tags. - * @member {Array.} tags - * @memberof google.devtools.artifactregistry.v1.DockerImage + * AptArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.tags = $util.emptyArray; + AptArtifact.prototype.packageName = ""; /** - * DockerImage imageSizeBytes. - * @member {number|Long} imageSizeBytes - * @memberof google.devtools.artifactregistry.v1.DockerImage + * AptArtifact packageType. + * @member {google.devtools.artifactregistry.v1.AptArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.imageSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AptArtifact.prototype.packageType = 0; /** - * DockerImage uploadTime. - * @member {google.protobuf.ITimestamp|null|undefined} uploadTime - * @memberof google.devtools.artifactregistry.v1.DockerImage + * AptArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.uploadTime = null; + AptArtifact.prototype.architecture = ""; /** - * DockerImage mediaType. - * @member {string} mediaType - * @memberof google.devtools.artifactregistry.v1.DockerImage + * AptArtifact component. + * @member {string} component + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.mediaType = ""; + AptArtifact.prototype.component = ""; /** - * DockerImage buildTime. - * @member {google.protobuf.ITimestamp|null|undefined} buildTime - * @memberof google.devtools.artifactregistry.v1.DockerImage + * AptArtifact controlFile. + * @member {Uint8Array} controlFile + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance */ - DockerImage.prototype.buildTime = null; + AptArtifact.prototype.controlFile = $util.newBuffer([]); /** - * Creates a new DockerImage instance using the specified properties. + * Creates a new AptArtifact instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage instance + * @param {google.devtools.artifactregistry.v1.IAptArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact instance */ - DockerImage.create = function create(properties) { - return new DockerImage(properties); + AptArtifact.create = function create(properties) { + return new AptArtifact(properties); }; /** - * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DockerImage.encode = function encode(message, writer) { + AptArtifact.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.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); - if (message.imageSizeBytes != null && Object.hasOwnProperty.call(message, "imageSizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.imageSizeBytes); - if (message.uploadTime != null && Object.hasOwnProperty.call(message, "uploadTime")) - $root.google.protobuf.Timestamp.encode(message.uploadTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaType); - if (message.buildTime != null && Object.hasOwnProperty.call(message, "buildTime")) - $root.google.protobuf.Timestamp.encode(message.buildTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.packageType); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.architecture); + if (message.component != null && Object.hasOwnProperty.call(message, "component")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.component); + if (message.controlFile != null && Object.hasOwnProperty.call(message, "controlFile")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.controlFile); return writer; }; /** - * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. + * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.AptArtifact.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IAptArtifact} message AptArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DockerImage.encodeDelimited = function encodeDelimited(message, writer) { + AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DockerImage message from the specified reader or buffer. + * Decodes an AptArtifact message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DockerImage.decode = function decode(reader, length) { + AptArtifact.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.devtools.artifactregistry.v1.DockerImage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -230,24 +217,19 @@ message.name = reader.string(); break; case 2: - message.uri = reader.string(); + message.packageName = reader.string(); break; case 3: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); + message.packageType = reader.int32(); break; case 4: - message.imageSizeBytes = reader.int64(); + message.architecture = reader.string(); break; case 5: - message.uploadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.component = reader.string(); break; case 6: - message.mediaType = reader.string(); - break; - case 7: - message.buildTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.controlFile = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -258,195 +240,193 @@ }; /** - * Decodes a DockerImage message from the specified reader or buffer, length delimited. + * Decodes an AptArtifact message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DockerImage.decodeDelimited = function decodeDelimited(reader) { + AptArtifact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DockerImage message. + * Verifies an AptArtifact message. * @function verify - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DockerImage.verify = function verify(message) { + AptArtifact.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"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) - if (!$util.isInteger(message.imageSizeBytes) && !(message.imageSizeBytes && $util.isInteger(message.imageSizeBytes.low) && $util.isInteger(message.imageSizeBytes.high))) - return "imageSizeBytes: integer|Long expected"; - if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.uploadTime); - if (error) - return "uploadTime." + error; - } - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - if (!$util.isString(message.mediaType)) - return "mediaType: string expected"; - if (message.buildTime != null && message.hasOwnProperty("buildTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.buildTime); - if (error) - return "buildTime." + error; - } + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + switch (message.packageType) { + default: + return "packageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + if (message.component != null && message.hasOwnProperty("component")) + if (!$util.isString(message.component)) + return "component: string expected"; + if (message.controlFile != null && message.hasOwnProperty("controlFile")) + if (!(message.controlFile && typeof message.controlFile.length === "number" || $util.isString(message.controlFile))) + return "controlFile: buffer expected"; return null; }; /** - * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. + * Creates an AptArtifact message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + * @returns {google.devtools.artifactregistry.v1.AptArtifact} AptArtifact */ - DockerImage.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.DockerImage) + AptArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.AptArtifact) return object; - var message = new $root.google.devtools.artifactregistry.v1.DockerImage(); + var message = new $root.google.devtools.artifactregistry.v1.AptArtifact(); if (object.name != null) message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.imageSizeBytes != null) - if ($util.Long) - (message.imageSizeBytes = $util.Long.fromValue(object.imageSizeBytes)).unsigned = false; - else if (typeof object.imageSizeBytes === "string") - message.imageSizeBytes = parseInt(object.imageSizeBytes, 10); - else if (typeof object.imageSizeBytes === "number") - message.imageSizeBytes = object.imageSizeBytes; - else if (typeof object.imageSizeBytes === "object") - message.imageSizeBytes = new $util.LongBits(object.imageSizeBytes.low >>> 0, object.imageSizeBytes.high >>> 0).toNumber(); - if (object.uploadTime != null) { - if (typeof object.uploadTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.uploadTime: object expected"); - message.uploadTime = $root.google.protobuf.Timestamp.fromObject(object.uploadTime); - } - if (object.mediaType != null) - message.mediaType = String(object.mediaType); - if (object.buildTime != null) { - if (typeof object.buildTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.buildTime: object expected"); - message.buildTime = $root.google.protobuf.Timestamp.fromObject(object.buildTime); + if (object.packageName != null) + message.packageName = String(object.packageName); + switch (object.packageType) { + case "PACKAGE_TYPE_UNSPECIFIED": + case 0: + message.packageType = 0; + break; + case "BINARY": + case 1: + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 2; + break; } + if (object.architecture != null) + message.architecture = String(object.architecture); + if (object.component != null) + message.component = String(object.component); + if (object.controlFile != null) + if (typeof object.controlFile === "string") + $util.base64.decode(object.controlFile, message.controlFile = $util.newBuffer($util.base64.length(object.controlFile)), 0); + else if (object.controlFile.length) + message.controlFile = object.controlFile; return message; }; /** - * Creates a plain object from a DockerImage message. Also converts values to other types if specified. + * Creates a plain object from an AptArtifact message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1.DockerImage} message DockerImage + * @param {google.devtools.artifactregistry.v1.AptArtifact} message AptArtifact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DockerImage.toObject = function toObject(message, options) { + AptArtifact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tags = []; if (options.defaults) { object.name = ""; - object.uri = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.imageSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.imageSizeBytes = options.longs === String ? "0" : 0; - object.uploadTime = null; - object.mediaType = ""; - object.buildTime = null; + object.packageName = ""; + object.packageType = options.enums === String ? "PACKAGE_TYPE_UNSPECIFIED" : 0; + object.architecture = ""; + object.component = ""; + if (options.bytes === String) + object.controlFile = ""; + else { + object.controlFile = []; + if (options.bytes !== Array) + object.controlFile = $util.newBuffer(object.controlFile); + } } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) - if (typeof message.imageSizeBytes === "number") - object.imageSizeBytes = options.longs === String ? String(message.imageSizeBytes) : message.imageSizeBytes; - else - object.imageSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.imageSizeBytes) : options.longs === Number ? new $util.LongBits(message.imageSizeBytes.low >>> 0, message.imageSizeBytes.high >>> 0).toNumber() : message.imageSizeBytes; - if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) - object.uploadTime = $root.google.protobuf.Timestamp.toObject(message.uploadTime, options); - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = message.mediaType; - if (message.buildTime != null && message.hasOwnProperty("buildTime")) - object.buildTime = $root.google.protobuf.Timestamp.toObject(message.buildTime, options); + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.AptArtifact.PackageType[message.packageType] : message.packageType; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + if (message.component != null && message.hasOwnProperty("component")) + object.component = message.component; + if (message.controlFile != null && message.hasOwnProperty("controlFile")) + object.controlFile = options.bytes === String ? $util.base64.encode(message.controlFile, 0, message.controlFile.length) : options.bytes === Array ? Array.prototype.slice.call(message.controlFile) : message.controlFile; return object; }; /** - * Converts this DockerImage to JSON. + * Converts this AptArtifact to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.DockerImage + * @memberof google.devtools.artifactregistry.v1.AptArtifact * @instance * @returns {Object.} JSON object */ - DockerImage.prototype.toJSON = function toJSON() { + AptArtifact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DockerImage; + /** + * PackageType enum. + * @name google.devtools.artifactregistry.v1.AptArtifact.PackageType + * @enum {number} + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value + */ + AptArtifact.PackageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; + return values; + })(); + + return AptArtifact; })(); - v1.ListDockerImagesRequest = (function() { + v1.ImportAptArtifactsGcsSource = (function() { /** - * Properties of a ListDockerImagesRequest. + * Properties of an ImportAptArtifactsGcsSource. * @memberof google.devtools.artifactregistry.v1 - * @interface IListDockerImagesRequest - * @property {string|null} [parent] ListDockerImagesRequest parent - * @property {number|null} [pageSize] ListDockerImagesRequest pageSize - * @property {string|null} [pageToken] ListDockerImagesRequest pageToken + * @interface IImportAptArtifactsGcsSource + * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards */ /** - * Constructs a new ListDockerImagesRequest. + * Constructs a new ImportAptArtifactsGcsSource. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListDockerImagesRequest. - * @implements IListDockerImagesRequest + * @classdesc Represents an ImportAptArtifactsGcsSource. + * @implements IImportAptArtifactsGcsSource * @constructor - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set */ - function ListDockerImagesRequest(properties) { + function ImportAptArtifactsGcsSource(properties) { + this.uris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -454,101 +434,91 @@ } /** - * ListDockerImagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest - * @instance - */ - ListDockerImagesRequest.prototype.parent = ""; - - /** - * ListDockerImagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * ImportAptArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @instance */ - ListDockerImagesRequest.prototype.pageSize = 0; + ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; /** - * ListDockerImagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * ImportAptArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @instance */ - ListDockerImagesRequest.prototype.pageToken = ""; + ImportAptArtifactsGcsSource.prototype.useWildcards = false; /** - * Creates a new ListDockerImagesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance */ - ListDockerImagesRequest.create = function create(properties) { - return new ListDockerImagesRequest(properties); + ImportAptArtifactsGcsSource.create = function create(properties) { + return new ImportAptArtifactsGcsSource(properties); }; /** - * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDockerImagesRequest.encode = function encode(message, writer) { + ImportAptArtifactsGcsSource.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); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uris[i]); + if (message.useWildcards != null && Object.hasOwnProperty.call(message, "useWildcards")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useWildcards); return writer; }; /** - * Encodes the specified ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDockerImagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDockerImagesRequest.decode = function decode(reader, length) { + ImportAptArtifactsGcsSource.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.devtools.artifactregistry.v1.ListDockerImagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.useWildcards = reader.bool(); break; default: reader.skipType(tag & 7); @@ -559,126 +529,129 @@ }; /** - * Decodes a ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDockerImagesRequest.decodeDelimited = function decodeDelimited(reader) { + ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDockerImagesRequest message. + * Verifies an ImportAptArtifactsGcsSource message. * @function verify - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDockerImagesRequest.verify = function verify(message) { + ImportAptArtifactsGcsSource.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"; + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + if (typeof message.useWildcards !== "boolean") + return "useWildcards: boolean expected"; return null; }; /** - * Creates a ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource */ - ListDockerImagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest) + ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource) return object; - var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); - 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); + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); return message; }; /** - * Creates a plain object from a ListDockerImagesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportAptArtifactsGcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1.ListDockerImagesRequest} message ListDockerImagesRequest + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDockerImagesRequest.toObject = function toObject(message, options) { + ImportAptArtifactsGcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) + object.uris = []; + if (options.defaults) + object.useWildcards = false; + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; } - 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; + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + object.useWildcards = message.useWildcards; return object; }; /** - * Converts this ListDockerImagesRequest to JSON. + * Converts this ImportAptArtifactsGcsSource to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource * @instance * @returns {Object.} JSON object */ - ListDockerImagesRequest.prototype.toJSON = function toJSON() { + ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDockerImagesRequest; + return ImportAptArtifactsGcsSource; })(); - v1.ListDockerImagesResponse = (function() { + v1.ImportAptArtifactsRequest = (function() { /** - * Properties of a ListDockerImagesResponse. + * Properties of an ImportAptArtifactsRequest. * @memberof google.devtools.artifactregistry.v1 - * @interface IListDockerImagesResponse - * @property {Array.|null} [dockerImages] ListDockerImagesResponse dockerImages - * @property {string|null} [nextPageToken] ListDockerImagesResponse nextPageToken + * @interface IImportAptArtifactsRequest + * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource + * @property {string|null} [parent] ImportAptArtifactsRequest parent */ /** - * Constructs a new ListDockerImagesResponse. + * Constructs a new ImportAptArtifactsRequest. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListDockerImagesResponse. - * @implements IListDockerImagesResponse + * @classdesc Represents an ImportAptArtifactsRequest. + * @implements IImportAptArtifactsRequest * @constructor - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set */ - function ListDockerImagesResponse(properties) { - this.dockerImages = []; + function ImportAptArtifactsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -686,91 +659,102 @@ } /** - * ListDockerImagesResponse dockerImages. - * @member {Array.} dockerImages - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * ImportAptArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @instance */ - ListDockerImagesResponse.prototype.dockerImages = $util.emptyArray; + ImportAptArtifactsRequest.prototype.gcsSource = null; /** - * ListDockerImagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * ImportAptArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @instance */ - ListDockerImagesResponse.prototype.nextPageToken = ""; + ImportAptArtifactsRequest.prototype.parent = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListDockerImagesResponse instance using the specified properties. + * ImportAptArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest + * @instance + */ + Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportAptArtifactsRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance */ - ListDockerImagesResponse.create = function create(properties) { - return new ListDockerImagesResponse(properties); + ImportAptArtifactsRequest.create = function create(properties) { + return new ImportAptArtifactsRequest(properties); }; /** - * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDockerImagesResponse.encode = function encode(message, writer) { + ImportAptArtifactsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dockerImages != null && message.dockerImages.length) - for (var i = 0; i < message.dockerImages.length; ++i) - $root.google.devtools.artifactregistry.v1.DockerImage.encode(message.dockerImages[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); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDockerImagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDockerImagesResponse.decode = function decode(reader, length) { + ImportAptArtifactsRequest.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.devtools.artifactregistry.v1.ListDockerImagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dockerImages && message.dockerImages.length)) - message.dockerImages = []; - message.dockerImages.push($root.google.devtools.artifactregistry.v1.DockerImage.decode(reader, reader.uint32())); - break; case 2: - message.nextPageToken = reader.string(); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); + break; + case 1: + message.parent = reader.string(); break; default: reader.skipType(tag & 7); @@ -781,140 +765,127 @@ }; /** - * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDockerImagesResponse.decodeDelimited = function decodeDelimited(reader) { + ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDockerImagesResponse message. + * Verifies an ImportAptArtifactsRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDockerImagesResponse.verify = function verify(message) { + ImportAptArtifactsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dockerImages != null && message.hasOwnProperty("dockerImages")) { - if (!Array.isArray(message.dockerImages)) - return "dockerImages: array expected"; - for (var i = 0; i < message.dockerImages.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.DockerImage.verify(message.dockerImages[i]); + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify(message.gcsSource); if (error) - return "dockerImages." + error; + return "gcsSource." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; return null; }; /** - * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} ImportAptArtifactsRequest */ - ListDockerImagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse) + ImportAptArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); - if (object.dockerImages) { - if (!Array.isArray(object.dockerImages)) - throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: array expected"); - message.dockerImages = []; - for (var i = 0; i < object.dockerImages.length; ++i) { - if (typeof object.dockerImages[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: object expected"); - message.dockerImages[i] = $root.google.devtools.artifactregistry.v1.DockerImage.fromObject(object.dockerImages[i]); - } + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.parent != null) + message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportAptArtifactsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} message ListDockerImagesResponse + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsRequest} message ImportAptArtifactsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDockerImagesResponse.toObject = function toObject(message, options) { + ImportAptArtifactsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dockerImages = []; if (options.defaults) - object.nextPageToken = ""; - if (message.dockerImages && message.dockerImages.length) { - object.dockerImages = []; - for (var j = 0; j < message.dockerImages.length; ++j) - object.dockerImages[j] = $root.google.devtools.artifactregistry.v1.DockerImage.toObject(message.dockerImages[j], options); + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListDockerImagesResponse to JSON. + * Converts this ImportAptArtifactsRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsRequest * @instance * @returns {Object.} JSON object */ - ListDockerImagesResponse.prototype.toJSON = function toJSON() { + ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDockerImagesResponse; + return ImportAptArtifactsRequest; })(); - v1.Repository = (function() { + v1.ImportAptArtifactsErrorInfo = (function() { /** - * Properties of a Repository. + * Properties of an ImportAptArtifactsErrorInfo. * @memberof google.devtools.artifactregistry.v1 - * @interface IRepository - * @property {string|null} [name] Repository name - * @property {google.devtools.artifactregistry.v1.Repository.Format|null} [format] Repository format - * @property {string|null} [description] Repository description - * @property {Object.|null} [labels] Repository labels - * @property {google.protobuf.ITimestamp|null} [createTime] Repository createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Repository updateTime - * @property {string|null} [kmsKeyName] Repository kmsKeyName + * @interface IImportAptArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error */ /** - * Constructs a new Repository. + * Constructs a new ImportAptArtifactsErrorInfo. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a Repository. - * @implements IRepository + * @classdesc Represents an ImportAptArtifactsErrorInfo. + * @implements IImportAptArtifactsErrorInfo * @constructor - * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set */ - function Repository(properties) { - this.labels = {}; + function ImportAptArtifactsErrorInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -922,173 +893,102 @@ } /** - * Repository name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.name = ""; - - /** - * Repository format. - * @member {google.devtools.artifactregistry.v1.Repository.Format} format - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.format = 0; - - /** - * Repository description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.description = ""; - - /** - * Repository labels. - * @member {Object.} labels - * @memberof google.devtools.artifactregistry.v1.Repository + * ImportAptArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @instance */ - Repository.prototype.labels = $util.emptyObject; + ImportAptArtifactsErrorInfo.prototype.gcsSource = null; /** - * Repository createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1.Repository + * ImportAptArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @instance */ - Repository.prototype.createTime = null; + ImportAptArtifactsErrorInfo.prototype.error = null; - /** - * Repository updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1.Repository - * @instance - */ - Repository.prototype.updateTime = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Repository kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.devtools.artifactregistry.v1.Repository + * ImportAptArtifactsErrorInfo source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @instance */ - Repository.prototype.kmsKeyName = ""; + Object.defineProperty(ImportAptArtifactsErrorInfo.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Repository instance using the specified properties. + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.Repository} Repository instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance */ - Repository.create = function create(properties) { - return new Repository(properties); + ImportAptArtifactsErrorInfo.create = function create(properties) { + return new ImportAptArtifactsErrorInfo(properties); }; /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Repository.encode = function encode(message, writer) { + ImportAptArtifactsErrorInfo.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.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.kmsKeyName); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Repository.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Repository message from the specified reader or buffer. + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Repository.decode = function decode(reader, length) { + ImportAptArtifactsErrorInfo.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.devtools.artifactregistry.v1.Repository(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); break; case 2: - message.format = reader.int32(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.kmsKeyName = reader.string(); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1099,245 +999,134 @@ }; /** - * Decodes a Repository message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Repository.decodeDelimited = function decodeDelimited(reader) { + ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Repository message. + * Verifies an ImportAptArtifactsErrorInfo message. * @function verify - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Repository.verify = function verify(message) { + ImportAptArtifactsErrorInfo.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"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 6: - case 8: - break; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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 (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); if (error) - return "updateTime." + error; + return "error." + error; } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; return null; }; /** - * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo */ - Repository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.Repository) + ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo) return object; - var message = new $root.google.devtools.artifactregistry.v1.Repository(); - if (object.name != null) - message.name = String(object.name); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "DOCKER": - case 1: - message.format = 1; - break; - case "MAVEN": - case 2: - message.format = 2; - break; - case "NPM": - case 3: - message.format = 3; - break; - case "APT": - case 5: - message.format = 5; - break; - case "YUM": - case 6: - message.format = 6; - break; - case "PYTHON": - case 8: - message.format = 8; - break; - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.Repository.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); } - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); return message; }; /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1.Repository} message Repository + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Repository.toObject = function toObject(message, options) { + ImportAptArtifactsErrorInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.kmsKeyName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] : message.format; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) + object.error = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "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.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); return object; }; /** - * Converts this Repository to JSON. + * Converts this ImportAptArtifactsErrorInfo to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.Repository + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo * @instance * @returns {Object.} JSON object */ - Repository.prototype.toJSON = function toJSON() { + ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Format enum. - * @name google.devtools.artifactregistry.v1.Repository.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} DOCKER=1 DOCKER value - * @property {number} MAVEN=2 MAVEN value - * @property {number} NPM=3 NPM value - * @property {number} APT=5 APT value - * @property {number} YUM=6 YUM value - * @property {number} PYTHON=8 PYTHON value - */ - Repository.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOCKER"] = 1; - values[valuesById[2] = "MAVEN"] = 2; - values[valuesById[3] = "NPM"] = 3; - values[valuesById[5] = "APT"] = 5; - values[valuesById[6] = "YUM"] = 6; - values[valuesById[8] = "PYTHON"] = 8; - return values; - })(); - - return Repository; + return ImportAptArtifactsErrorInfo; })(); - v1.ListRepositoriesRequest = (function() { + v1.ImportAptArtifactsResponse = (function() { /** - * Properties of a ListRepositoriesRequest. + * Properties of an ImportAptArtifactsResponse. * @memberof google.devtools.artifactregistry.v1 - * @interface IListRepositoriesRequest - * @property {string|null} [parent] ListRepositoriesRequest parent - * @property {number|null} [pageSize] ListRepositoriesRequest pageSize - * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @interface IImportAptArtifactsResponse + * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts + * @property {Array.|null} [errors] ImportAptArtifactsResponse errors */ /** - * Constructs a new ListRepositoriesRequest. + * Constructs a new ImportAptArtifactsResponse. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRepositoriesRequest. - * @implements IListRepositoriesRequest + * @classdesc Represents an ImportAptArtifactsResponse. + * @implements IImportAptArtifactsResponse * @constructor - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set */ - function ListRepositoriesRequest(properties) { + function ImportAptArtifactsResponse(properties) { + this.aptArtifacts = []; + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1345,101 +1134,94 @@ } /** - * ListRepositoriesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest - * @instance - */ - ListRepositoriesRequest.prototype.parent = ""; - - /** - * ListRepositoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * ImportAptArtifactsResponse aptArtifacts. + * @member {Array.} aptArtifacts + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @instance */ - ListRepositoriesRequest.prototype.pageSize = 0; + ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; /** - * ListRepositoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * ImportAptArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @instance */ - ListRepositoriesRequest.prototype.pageToken = ""; + ImportAptArtifactsResponse.prototype.errors = $util.emptyArray; /** - * Creates a new ListRepositoriesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsResponse instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance */ - ListRepositoriesRequest.create = function create(properties) { - return new ListRepositoriesRequest(properties); + ImportAptArtifactsResponse.create = function create(properties) { + return new ImportAptArtifactsResponse(properties); }; /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesRequest.encode = function encode(message, writer) { + ImportAptArtifactsResponse.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); + if (message.aptArtifacts != null && message.aptArtifacts.length) + for (var i = 0; i < message.aptArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1.AptArtifact.encode(message.aptArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRepositoriesRequest.decode = function decode(reader, length) { + ImportAptArtifactsResponse.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.devtools.artifactregistry.v1.ListRepositoriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.aptArtifacts && message.aptArtifacts.length)) + message.aptArtifacts = []; + message.aptArtifacts.push($root.google.devtools.artifactregistry.v1.AptArtifact.decode(reader, reader.uint32())); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -1450,126 +1232,149 @@ }; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRepositoriesRequest message. + * Verifies an ImportAptArtifactsResponse message. * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRepositoriesRequest.verify = function verify(message) { + ImportAptArtifactsResponse.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"; + if (message.aptArtifacts != null && message.hasOwnProperty("aptArtifacts")) { + if (!Array.isArray(message.aptArtifacts)) + return "aptArtifacts: array expected"; + for (var i = 0; i < message.aptArtifacts.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.AptArtifact.verify(message.aptArtifacts[i]); + if (error) + return "aptArtifacts." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } return null; }; /** - * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} ImportAptArtifactsResponse */ - ListRepositoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest) + ImportAptArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse) return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); - 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); + var message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse(); + if (object.aptArtifacts) { + if (!Array.isArray(object.aptArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: array expected"); + message.aptArtifacts = []; + for (var i = 0; i < object.aptArtifacts.length; ++i) { + if (typeof object.aptArtifacts[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.aptArtifacts: object expected"); + message.aptArtifacts[i] = $root.google.devtools.artifactregistry.v1.AptArtifact.fromObject(object.aptArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportAptArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.fromObject(object.errors[i]); + } + } return message; }; /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportAptArtifactsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsResponse} message ImportAptArtifactsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRepositoriesRequest.toObject = function toObject(message, options) { + ImportAptArtifactsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) { + object.aptArtifacts = []; + object.errors = []; + } + if (message.aptArtifacts && message.aptArtifacts.length) { + object.aptArtifacts = []; + for (var j = 0; j < message.aptArtifacts.length; ++j) + object.aptArtifacts[j] = $root.google.devtools.artifactregistry.v1.AptArtifact.toObject(message.aptArtifacts[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportAptArtifactsErrorInfo.toObject(message.errors[j], options); } - 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 ListRepositoriesRequest to JSON. + * Converts this ImportAptArtifactsResponse to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsResponse * @instance * @returns {Object.} JSON object */ - ListRepositoriesRequest.prototype.toJSON = function toJSON() { + ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListRepositoriesRequest; + return ImportAptArtifactsResponse; })(); - v1.ListRepositoriesResponse = (function() { + v1.ImportAptArtifactsMetadata = (function() { /** - * Properties of a ListRepositoriesResponse. + * Properties of an ImportAptArtifactsMetadata. * @memberof google.devtools.artifactregistry.v1 - * @interface IListRepositoriesResponse - * @property {Array.|null} [repositories] ListRepositoriesResponse repositories - * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @interface IImportAptArtifactsMetadata */ /** - * Constructs a new ListRepositoriesResponse. + * Constructs a new ImportAptArtifactsMetadata. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a ListRepositoriesResponse. - * @implements IListRepositoriesResponse + * @classdesc Represents an ImportAptArtifactsMetadata. + * @implements IImportAptArtifactsMetadata * @constructor - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set */ - function ListRepositoriesResponse(properties) { - this.repositories = []; + function ImportAptArtifactsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1577,92 +1382,63 @@ } /** - * ListRepositoriesResponse repositories. - * @member {Array.} repositories - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.repositories = $util.emptyArray; - - /** - * ListRepositoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse - * @instance - */ - ListRepositoriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListRepositoriesResponse instance using the specified properties. + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance */ - ListRepositoriesResponse.create = function create(properties) { - return new ListRepositoriesResponse(properties); + ImportAptArtifactsMetadata.create = function create(properties) { + return new ImportAptArtifactsMetadata(properties); }; /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesResponse.encode = function encode(message, writer) { + ImportAptArtifactsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.repositories != null && message.repositories.length) - for (var i = 0; i < message.repositories.length; ++i) - $root.google.devtools.artifactregistry.v1.Repository.encode(message.repositories[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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRepositoriesResponse.decode = function decode(reader, length) { + ImportAptArtifactsMetadata.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.devtools.artifactregistry.v1.ListRepositoriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.repositories && message.repositories.length)) - message.repositories = []; - message.repositories.push($root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -1672,133 +1448,101 @@ }; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRepositoriesResponse message. + * Verifies an ImportAptArtifactsMetadata message. * @function verify - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRepositoriesResponse.verify = function verify(message) { + ImportAptArtifactsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.repositories != null && message.hasOwnProperty("repositories")) { - if (!Array.isArray(message.repositories)) - return "repositories: array expected"; - for (var i = 0; i < message.repositories.length; ++i) { - var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repositories[i]); - if (error) - return "repositories." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata */ - ListRepositoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse) + ImportAptArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata) return object; - var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); - if (object.repositories) { - if (!Array.isArray(object.repositories)) - throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: array expected"); - message.repositories = []; - for (var i = 0; i < object.repositories.length; ++i) { - if (typeof object.repositories[i] !== "object") - throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: object expected"); - message.repositories[i] = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repositories[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; + return new $root.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata(); }; /** - * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportAptArtifactsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRepositoriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repositories = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.repositories && message.repositories.length) { - object.repositories = []; - for (var j = 0; j < message.repositories.length; ++j) - object.repositories[j] = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repositories[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; + ImportAptArtifactsMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this ListRepositoriesResponse to JSON. + * Converts this ImportAptArtifactsMetadata to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata * @instance * @returns {Object.} JSON object */ - ListRepositoriesResponse.prototype.toJSON = function toJSON() { + ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListRepositoriesResponse; + return ImportAptArtifactsMetadata; })(); - v1.GetRepositoryRequest = (function() { + v1.DockerImage = (function() { /** - * Properties of a GetRepositoryRequest. + * Properties of a DockerImage. * @memberof google.devtools.artifactregistry.v1 - * @interface IGetRepositoryRequest - * @property {string|null} [name] GetRepositoryRequest name + * @interface IDockerImage + * @property {string|null} [name] DockerImage name + * @property {string|null} [uri] DockerImage uri + * @property {Array.|null} [tags] DockerImage tags + * @property {number|Long|null} [imageSizeBytes] DockerImage imageSizeBytes + * @property {google.protobuf.ITimestamp|null} [uploadTime] DockerImage uploadTime + * @property {string|null} [mediaType] DockerImage mediaType + * @property {google.protobuf.ITimestamp|null} [buildTime] DockerImage buildTime */ /** - * Constructs a new GetRepositoryRequest. + * Constructs a new DockerImage. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents a GetRepositoryRequest. - * @implements IGetRepositoryRequest + * @classdesc Represents a DockerImage. + * @implements IDockerImage * @constructor - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set */ - function GetRepositoryRequest(properties) { + function DockerImage(properties) { + this.tags = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1806,76 +1550,157 @@ } /** - * GetRepositoryRequest name. + * DockerImage name. * @member {string} name - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @instance */ - GetRepositoryRequest.prototype.name = ""; + DockerImage.prototype.name = ""; /** - * Creates a new GetRepositoryRequest instance using the specified properties. + * DockerImage uri. + * @member {string} uri + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.uri = ""; + + /** + * DockerImage tags. + * @member {Array.} tags + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.tags = $util.emptyArray; + + /** + * DockerImage imageSizeBytes. + * @member {number|Long} imageSizeBytes + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.imageSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DockerImage uploadTime. + * @member {google.protobuf.ITimestamp|null|undefined} uploadTime + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.uploadTime = null; + + /** + * DockerImage mediaType. + * @member {string} mediaType + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.mediaType = ""; + + /** + * DockerImage buildTime. + * @member {google.protobuf.ITimestamp|null|undefined} buildTime + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + */ + DockerImage.prototype.buildTime = null; + + /** + * Creates a new DockerImage instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest instance + * @param {google.devtools.artifactregistry.v1.IDockerImage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage instance */ - GetRepositoryRequest.create = function create(properties) { - return new GetRepositoryRequest(properties); + DockerImage.create = function create(properties) { + return new DockerImage(properties); }; /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * Encodes the specified DockerImage message. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRepositoryRequest.encode = function encode(message, writer) { + DockerImage.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.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tags[i]); + if (message.imageSizeBytes != null && Object.hasOwnProperty.call(message, "imageSizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.imageSizeBytes); + if (message.uploadTime != null && Object.hasOwnProperty.call(message, "uploadTime")) + $root.google.protobuf.Timestamp.encode(message.uploadTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaType); + if (message.buildTime != null && Object.hasOwnProperty.call(message, "buildTime")) + $root.google.protobuf.Timestamp.encode(message.buildTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * Encodes the specified DockerImage message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DockerImage.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1.IDockerImage} message DockerImage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + DockerImage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * Decodes a DockerImage message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRepositoryRequest.decode = function decode(reader, length) { + DockerImage.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.devtools.artifactregistry.v1.GetRepositoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1.DockerImage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.uri = reader.string(); + break; + case 3: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 4: + message.imageSizeBytes = reader.int64(); + break; + case 5: + message.uploadTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.mediaType = reader.string(); + break; + case 7: + message.buildTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -1885,221 +1710,11211 @@ }; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a DockerImage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + DockerImage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRepositoryRequest message. + * Verifies a DockerImage message. * @function verify - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.DockerImage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRepositoryRequest.verify = function verify(message) { + DockerImage.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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest - */ - GetRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1.GetRepositoryRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) + if (!$util.isInteger(message.imageSizeBytes) && !(message.imageSizeBytes && $util.isInteger(message.imageSizeBytes.low) && $util.isInteger(message.imageSizeBytes.high))) + return "imageSizeBytes: integer|Long expected"; + if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.uploadTime); + if (error) + return "uploadTime." + error; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + if (!$util.isString(message.mediaType)) + return "mediaType: string expected"; + if (message.buildTime != null && message.hasOwnProperty("buildTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.buildTime); + if (error) + return "buildTime." + error; + } + return null; + }; + + /** + * Creates a DockerImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DockerImage} DockerImage + */ + DockerImage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DockerImage) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DockerImage(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.imageSizeBytes != null) + if ($util.Long) + (message.imageSizeBytes = $util.Long.fromValue(object.imageSizeBytes)).unsigned = false; + else if (typeof object.imageSizeBytes === "string") + message.imageSizeBytes = parseInt(object.imageSizeBytes, 10); + else if (typeof object.imageSizeBytes === "number") + message.imageSizeBytes = object.imageSizeBytes; + else if (typeof object.imageSizeBytes === "object") + message.imageSizeBytes = new $util.LongBits(object.imageSizeBytes.low >>> 0, object.imageSizeBytes.high >>> 0).toNumber(); + if (object.uploadTime != null) { + if (typeof object.uploadTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.uploadTime: object expected"); + message.uploadTime = $root.google.protobuf.Timestamp.fromObject(object.uploadTime); + } + if (object.mediaType != null) + message.mediaType = String(object.mediaType); + if (object.buildTime != null) { + if (typeof object.buildTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.DockerImage.buildTime: object expected"); + message.buildTime = $root.google.protobuf.Timestamp.fromObject(object.buildTime); + } + return message; + }; + + /** + * Creates a plain object from a DockerImage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @static + * @param {google.devtools.artifactregistry.v1.DockerImage} message DockerImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DockerImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) { + object.name = ""; + object.uri = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.imageSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.imageSizeBytes = options.longs === String ? "0" : 0; + object.uploadTime = null; + object.mediaType = ""; + object.buildTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.imageSizeBytes != null && message.hasOwnProperty("imageSizeBytes")) + if (typeof message.imageSizeBytes === "number") + object.imageSizeBytes = options.longs === String ? String(message.imageSizeBytes) : message.imageSizeBytes; + else + object.imageSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.imageSizeBytes) : options.longs === Number ? new $util.LongBits(message.imageSizeBytes.low >>> 0, message.imageSizeBytes.high >>> 0).toNumber() : message.imageSizeBytes; + if (message.uploadTime != null && message.hasOwnProperty("uploadTime")) + object.uploadTime = $root.google.protobuf.Timestamp.toObject(message.uploadTime, options); + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = message.mediaType; + if (message.buildTime != null && message.hasOwnProperty("buildTime")) + object.buildTime = $root.google.protobuf.Timestamp.toObject(message.buildTime, options); + return object; + }; + + /** + * Converts this DockerImage to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DockerImage + * @instance + * @returns {Object.} JSON object + */ + DockerImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DockerImage; + })(); + + v1.ListDockerImagesRequest = (function() { + + /** + * Properties of a ListDockerImagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListDockerImagesRequest + * @property {string|null} [parent] ListDockerImagesRequest parent + * @property {number|null} [pageSize] ListDockerImagesRequest pageSize + * @property {string|null} [pageToken] ListDockerImagesRequest pageToken + */ + + /** + * Constructs a new ListDockerImagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListDockerImagesRequest. + * @implements IListDockerImagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set + */ + function ListDockerImagesRequest(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]]; + } + + /** + * ListDockerImagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.parent = ""; + + /** + * ListDockerImagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.pageSize = 0; + + /** + * ListDockerImagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + */ + ListDockerImagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDockerImagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest instance + */ + ListDockerImagesRequest.create = function create(properties) { + return new ListDockerImagesRequest(properties); + }; + + /** + * Encodes the specified ListDockerImagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesRequest.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 ListDockerImagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} message ListDockerImagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDockerImagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesRequest.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.devtools.artifactregistry.v1.ListDockerImagesRequest(); + 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 ListDockerImagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDockerImagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDockerImagesRequest.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 ListDockerImagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesRequest} ListDockerImagesRequest + */ + ListDockerImagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest(); + 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 ListDockerImagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListDockerImagesRequest} message ListDockerImagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDockerImagesRequest.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 ListDockerImagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDockerImagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDockerImagesRequest; + })(); + + v1.ListDockerImagesResponse = (function() { + + /** + * Properties of a ListDockerImagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListDockerImagesResponse + * @property {Array.|null} [dockerImages] ListDockerImagesResponse dockerImages + * @property {string|null} [nextPageToken] ListDockerImagesResponse nextPageToken + */ + + /** + * Constructs a new ListDockerImagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListDockerImagesResponse. + * @implements IListDockerImagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set + */ + function ListDockerImagesResponse(properties) { + this.dockerImages = []; + 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]]; + } + + /** + * ListDockerImagesResponse dockerImages. + * @member {Array.} dockerImages + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + */ + ListDockerImagesResponse.prototype.dockerImages = $util.emptyArray; + + /** + * ListDockerImagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + */ + ListDockerImagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDockerImagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse instance + */ + ListDockerImagesResponse.create = function create(properties) { + return new ListDockerImagesResponse(properties); + }; + + /** + * Encodes the specified ListDockerImagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dockerImages != null && message.dockerImages.length) + for (var i = 0; i < message.dockerImages.length; ++i) + $root.google.devtools.artifactregistry.v1.DockerImage.encode(message.dockerImages[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 ListDockerImagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListDockerImagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListDockerImagesResponse} message ListDockerImagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDockerImagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesResponse.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.devtools.artifactregistry.v1.ListDockerImagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dockerImages && message.dockerImages.length)) + message.dockerImages = []; + message.dockerImages.push($root.google.devtools.artifactregistry.v1.DockerImage.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDockerImagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDockerImagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDockerImagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDockerImagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dockerImages != null && message.hasOwnProperty("dockerImages")) { + if (!Array.isArray(message.dockerImages)) + return "dockerImages: array expected"; + for (var i = 0; i < message.dockerImages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.DockerImage.verify(message.dockerImages[i]); + if (error) + return "dockerImages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDockerImagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListDockerImagesResponse} ListDockerImagesResponse + */ + ListDockerImagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse(); + if (object.dockerImages) { + if (!Array.isArray(object.dockerImages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: array expected"); + message.dockerImages = []; + for (var i = 0; i < object.dockerImages.length; ++i) { + if (typeof object.dockerImages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListDockerImagesResponse.dockerImages: object expected"); + message.dockerImages[i] = $root.google.devtools.artifactregistry.v1.DockerImage.fromObject(object.dockerImages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDockerImagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} message ListDockerImagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDockerImagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dockerImages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dockerImages && message.dockerImages.length) { + object.dockerImages = []; + for (var j = 0; j < message.dockerImages.length; ++j) + object.dockerImages[j] = $root.google.devtools.artifactregistry.v1.DockerImage.toObject(message.dockerImages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDockerImagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListDockerImagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDockerImagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDockerImagesResponse; + })(); + + v1.GetDockerImageRequest = (function() { + + /** + * Properties of a GetDockerImageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetDockerImageRequest + * @property {string|null} [name] GetDockerImageRequest name + */ + + /** + * Constructs a new GetDockerImageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetDockerImageRequest. + * @implements IGetDockerImageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set + */ + function GetDockerImageRequest(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]]; + } + + /** + * GetDockerImageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @instance + */ + GetDockerImageRequest.prototype.name = ""; + + /** + * Creates a new GetDockerImageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest instance + */ + GetDockerImageRequest.create = function create(properties) { + return new GetDockerImageRequest(properties); + }; + + /** + * Encodes the specified GetDockerImageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDockerImageRequest.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 GetDockerImageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetDockerImageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} message GetDockerImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDockerImageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDockerImageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDockerImageRequest.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.devtools.artifactregistry.v1.GetDockerImageRequest(); + 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 GetDockerImageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDockerImageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDockerImageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDockerImageRequest.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 GetDockerImageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetDockerImageRequest} GetDockerImageRequest + */ + GetDockerImageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetDockerImageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetDockerImageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDockerImageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetDockerImageRequest} message GetDockerImageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDockerImageRequest.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 GetDockerImageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetDockerImageRequest + * @instance + * @returns {Object.} JSON object + */ + GetDockerImageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDockerImageRequest; + })(); + + v1.Hash = (function() { + + /** + * Properties of a Hash. + * @memberof google.devtools.artifactregistry.v1 + * @interface IHash + * @property {google.devtools.artifactregistry.v1.Hash.HashType|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value + */ + + /** + * Constructs a new Hash. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Hash. + * @implements IHash + * @constructor + * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set + */ + function Hash(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]]; + } + + /** + * Hash type. + * @member {google.devtools.artifactregistry.v1.Hash.HashType} type + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + */ + Hash.prototype.type = 0; + + /** + * Hash value. + * @member {Uint8Array} value + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + */ + Hash.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Hash instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Hash} Hash instance + */ + Hash.create = function create(properties) { + return new Hash(properties); + }; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Hash.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.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.devtools.artifactregistry.v1.Hash(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Hash message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hash.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Hash} Hash + */ + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Hash) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Hash(); + switch (object.type) { + case "HASH_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SHA256": + case 1: + message.type = 1; + break; + case "MD5": + case 2: + message.type = 2; + break; + } + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Hash + * @static + * @param {google.devtools.artifactregistry.v1.Hash} message Hash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hash.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1.Hash.HashType[message.type] : message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Hash to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Hash + * @instance + * @returns {Object.} JSON object + */ + Hash.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HashType enum. + * @name google.devtools.artifactregistry.v1.Hash.HashType + * @enum {number} + * @property {number} HASH_TYPE_UNSPECIFIED=0 HASH_TYPE_UNSPECIFIED value + * @property {number} SHA256=1 SHA256 value + * @property {number} MD5=2 MD5 value + */ + Hash.HashType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HASH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHA256"] = 1; + values[valuesById[2] = "MD5"] = 2; + return values; + })(); + + return Hash; + })(); + + v1.File = (function() { + + /** + * Properties of a File. + * @memberof google.devtools.artifactregistry.v1 + * @interface IFile + * @property {string|null} [name] File name + * @property {number|Long|null} [sizeBytes] File sizeBytes + * @property {Array.|null} [hashes] File hashes + * @property {google.protobuf.ITimestamp|null} [createTime] File createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] File updateTime + * @property {string|null} [owner] File owner + */ + + /** + * Constructs a new File. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a File. + * @implements IFile + * @constructor + * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set + */ + function File(properties) { + this.hashes = []; + 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]]; + } + + /** + * File name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.name = ""; + + /** + * File sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * File hashes. + * @member {Array.} hashes + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.hashes = $util.emptyArray; + + /** + * File createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.createTime = null; + + /** + * File updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.updateTime = null; + + /** + * File owner. + * @member {string} owner + * @memberof google.devtools.artifactregistry.v1.File + * @instance + */ + File.prototype.owner = ""; + + /** + * Creates a new File instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.File} File instance + */ + File.create = function create(properties) { + return new File(properties); + }; + + /** + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.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.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sizeBytes); + if (message.hashes != null && message.hashes.length) + for (var i = 0; i < message.hashes.length; ++i) + $root.google.devtools.artifactregistry.v1.Hash.encode(message.hashes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.owner); + return writer; + }; + + /** + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.File.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.IFile} message File message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + File.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a File message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.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.devtools.artifactregistry.v1.File(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.sizeBytes = reader.int64(); + break; + case 4: + if (!(message.hashes && message.hashes.length)) + message.hashes = []; + message.hashes.push($root.google.devtools.artifactregistry.v1.Hash.decode(reader, reader.uint32())); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.owner = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a File message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.File} File + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + File.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a File message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + File.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"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + if (message.hashes != null && message.hasOwnProperty("hashes")) { + if (!Array.isArray(message.hashes)) + return "hashes: array expected"; + for (var i = 0; i < message.hashes.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Hash.verify(message.hashes[i]); + if (error) + return "hashes." + 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.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + return null; + }; + + /** + * Creates a File message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.File} File + */ + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.File) + return object; + var message = new $root.google.devtools.artifactregistry.v1.File(); + if (object.name != null) + message.name = String(object.name); + if (object.sizeBytes != null) + if ($util.Long) + (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; + else if (typeof object.sizeBytes === "string") + message.sizeBytes = parseInt(object.sizeBytes, 10); + else if (typeof object.sizeBytes === "number") + message.sizeBytes = object.sizeBytes; + else if (typeof object.sizeBytes === "object") + message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + if (object.hashes) { + if (!Array.isArray(object.hashes)) + throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: array expected"); + message.hashes = []; + for (var i = 0; i < object.hashes.length; ++i) { + if (typeof object.hashes[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.hashes: object expected"); + message.hashes[i] = $root.google.devtools.artifactregistry.v1.Hash.fromObject(object.hashes[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.File.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.owner != null) + message.owner = String(object.owner); + return message; + }; + + /** + * Creates a plain object from a File message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.File + * @static + * @param {google.devtools.artifactregistry.v1.File} message File + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + File.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hashes = []; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sizeBytes = options.longs === String ? "0" : 0; + object.createTime = null; + object.updateTime = null; + object.owner = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.hashes && message.hashes.length) { + object.hashes = []; + for (var j = 0; j < message.hashes.length; ++j) + object.hashes[j] = $root.google.devtools.artifactregistry.v1.Hash.toObject(message.hashes[j], options); + } + 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.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; + return object; + }; + + /** + * Converts this File to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.File + * @instance + * @returns {Object.} JSON object + */ + File.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return File; + })(); + + v1.ListFilesRequest = (function() { + + /** + * Properties of a ListFilesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListFilesRequest + * @property {string|null} [parent] ListFilesRequest parent + * @property {string|null} [filter] ListFilesRequest filter + * @property {number|null} [pageSize] ListFilesRequest pageSize + * @property {string|null} [pageToken] ListFilesRequest pageToken + * @property {string|null} [orderBy] ListFilesRequest orderBy + */ + + /** + * Constructs a new ListFilesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListFilesRequest. + * @implements IListFilesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set + */ + function ListFilesRequest(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]]; + } + + /** + * ListFilesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.parent = ""; + + /** + * ListFilesRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.filter = ""; + + /** + * ListFilesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageSize = 0; + + /** + * ListFilesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageToken = ""; + + /** + * ListFilesRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListFilesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest instance + */ + ListFilesRequest.create = function create(properties) { + return new ListFilesRequest(properties); + }; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesRequest.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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesRequest.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.devtools.artifactregistry.v1.ListFilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 4: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListFilesRequest} ListFilesRequest + */ + ListFilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListFilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListFilesRequest} message ListFilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + 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; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListFilesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListFilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListFilesRequest; + })(); + + v1.ListFilesResponse = (function() { + + /** + * Properties of a ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListFilesResponse + * @property {Array.|null} [files] ListFilesResponse files + * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken + */ + + /** + * Constructs a new ListFilesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListFilesResponse. + * @implements IListFilesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set + */ + function ListFilesResponse(properties) { + this.files = []; + 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]]; + } + + /** + * ListFilesResponse files. + * @member {Array.} files + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.files = $util.emptyArray; + + /** + * ListFilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFilesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse instance + */ + ListFilesResponse.create = function create(properties) { + return new ListFilesResponse(properties); + }; + + /** + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.devtools.artifactregistry.v1.File.encode(message.files[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 ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListFilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesResponse.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.devtools.artifactregistry.v1.ListFilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.devtools.artifactregistry.v1.File.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFilesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFilesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.File.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListFilesResponse} ListFilesResponse + */ + ListFilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListFilesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListFilesResponse(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListFilesResponse.files: object expected"); + message.files[i] = $root.google.devtools.artifactregistry.v1.File.fromObject(object.files[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListFilesResponse} message ListFilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.devtools.artifactregistry.v1.File.toObject(message.files[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFilesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListFilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListFilesResponse; + })(); + + v1.GetFileRequest = (function() { + + /** + * Properties of a GetFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetFileRequest + * @property {string|null} [name] GetFileRequest name + */ + + /** + * Constructs a new GetFileRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetFileRequest. + * @implements IGetFileRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set + */ + function GetFileRequest(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]]; + } + + /** + * GetFileRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @instance + */ + GetFileRequest.prototype.name = ""; + + /** + * Creates a new GetFileRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest instance + */ + GetFileRequest.create = function create(properties) { + return new GetFileRequest(properties); + }; + + /** + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileRequest.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 GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileRequest.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.devtools.artifactregistry.v1.GetFileRequest(); + 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 GetFileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFileRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFileRequest.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 GetFileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetFileRequest} GetFileRequest + */ + GetFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetFileRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetFileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetFileRequest} message GetFileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFileRequest.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 GetFileRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetFileRequest + * @instance + * @returns {Object.} JSON object + */ + GetFileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetFileRequest; + })(); + + v1.Package = (function() { + + /** + * Properties of a Package. + * @memberof google.devtools.artifactregistry.v1 + * @interface IPackage + * @property {string|null} [name] Package name + * @property {string|null} [displayName] Package displayName + * @property {google.protobuf.ITimestamp|null} [createTime] Package createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Package updateTime + */ + + /** + * Constructs a new Package. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Package. + * @implements IPackage + * @constructor + * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set + */ + function Package(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]]; + } + + /** + * Package name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.name = ""; + + /** + * Package displayName. + * @member {string} displayName + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.displayName = ""; + + /** + * Package createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.createTime = null; + + /** + * Package updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + */ + Package.prototype.updateTime = null; + + /** + * Creates a new Package instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Package} Package instance + */ + Package.create = function create(properties) { + return new Package(properties); + }; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Package.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Package message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.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.devtools.artifactregistry.v1.Package(); + 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 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Package message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Package.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"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + 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; + } + return null; + }; + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Package} Package + */ + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Package) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Package(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Package.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Package.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Package + * @static + * @param {google.devtools.artifactregistry.v1.Package} message Package + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Package.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = 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.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); + return object; + }; + + /** + * Converts this Package to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Package + * @instance + * @returns {Object.} JSON object + */ + Package.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Package; + })(); + + v1.ListPackagesRequest = (function() { + + /** + * Properties of a ListPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPackagesRequest + * @property {string|null} [parent] ListPackagesRequest parent + * @property {number|null} [pageSize] ListPackagesRequest pageSize + * @property {string|null} [pageToken] ListPackagesRequest pageToken + */ + + /** + * Constructs a new ListPackagesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPackagesRequest. + * @implements IListPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set + */ + function ListPackagesRequest(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]]; + } + + /** + * ListPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.parent = ""; + + /** + * ListPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageSize = 0; + + /** + * ListPackagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest instance + */ + ListPackagesRequest.create = function create(properties) { + return new ListPackagesRequest(properties); + }; + + /** + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesRequest.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 ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesRequest.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.devtools.artifactregistry.v1.ListPackagesRequest(); + 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 ListPackagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesRequest.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 ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPackagesRequest} ListPackagesRequest + */ + ListPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPackagesRequest(); + 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 ListPackagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListPackagesRequest} message ListPackagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesRequest.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 ListPackagesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPackagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPackagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPackagesRequest; + })(); + + v1.ListPackagesResponse = (function() { + + /** + * Properties of a ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListPackagesResponse + * @property {Array.|null} [packages] ListPackagesResponse packages + * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken + */ + + /** + * Constructs a new ListPackagesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListPackagesResponse. + * @implements IListPackagesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set + */ + function ListPackagesResponse(properties) { + this.packages = []; + 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]]; + } + + /** + * ListPackagesResponse packages. + * @member {Array.} packages + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.packages = $util.emptyArray; + + /** + * ListPackagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse instance + */ + ListPackagesResponse.create = function create(properties) { + return new ListPackagesResponse(properties); + }; + + /** + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packages != null && message.packages.length) + for (var i = 0; i < message.packages.length; ++i) + $root.google.devtools.artifactregistry.v1.Package.encode(message.packages[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 ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListPackagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesResponse.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.devtools.artifactregistry.v1.ListPackagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.packages && message.packages.length)) + message.packages = []; + message.packages.push($root.google.devtools.artifactregistry.v1.Package.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPackagesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPackagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packages != null && message.hasOwnProperty("packages")) { + if (!Array.isArray(message.packages)) + return "packages: array expected"; + for (var i = 0; i < message.packages.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Package.verify(message.packages[i]); + if (error) + return "packages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListPackagesResponse} ListPackagesResponse + */ + ListPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListPackagesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListPackagesResponse(); + if (object.packages) { + if (!Array.isArray(object.packages)) + throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: array expected"); + message.packages = []; + for (var i = 0; i < object.packages.length; ++i) { + if (typeof object.packages[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListPackagesResponse.packages: object expected"); + message.packages[i] = $root.google.devtools.artifactregistry.v1.Package.fromObject(object.packages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} message ListPackagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPackagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.packages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.packages && message.packages.length) { + object.packages = []; + for (var j = 0; j < message.packages.length; ++j) + object.packages[j] = $root.google.devtools.artifactregistry.v1.Package.toObject(message.packages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPackagesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListPackagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPackagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListPackagesResponse; + })(); + + v1.GetPackageRequest = (function() { + + /** + * Properties of a GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetPackageRequest + * @property {string|null} [name] GetPackageRequest name + */ + + /** + * Constructs a new GetPackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetPackageRequest. + * @implements IGetPackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set + */ + function GetPackageRequest(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]]; + } + + /** + * GetPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @instance + */ + GetPackageRequest.prototype.name = ""; + + /** + * Creates a new GetPackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest instance + */ + GetPackageRequest.create = function create(properties) { + return new GetPackageRequest(properties); + }; + + /** + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPackageRequest.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 GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetPackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPackageRequest.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.devtools.artifactregistry.v1.GetPackageRequest(); + 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 GetPackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPackageRequest.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 GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetPackageRequest} GetPackageRequest + */ + GetPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetPackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetPackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetPackageRequest} message GetPackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPackageRequest.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 GetPackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetPackageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetPackageRequest; + })(); + + v1.DeletePackageRequest = (function() { + + /** + * Properties of a DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeletePackageRequest + * @property {string|null} [name] DeletePackageRequest name + */ + + /** + * Constructs a new DeletePackageRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeletePackageRequest. + * @implements IDeletePackageRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set + */ + function DeletePackageRequest(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]]; + } + + /** + * DeletePackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @instance + */ + DeletePackageRequest.prototype.name = ""; + + /** + * Creates a new DeletePackageRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest instance + */ + DeletePackageRequest.create = function create(properties) { + return new DeletePackageRequest(properties); + }; + + /** + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePackageRequest.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 DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeletePackageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePackageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePackageRequest.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.devtools.artifactregistry.v1.DeletePackageRequest(); + 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 DeletePackageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePackageRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePackageRequest.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 DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeletePackageRequest} DeletePackageRequest + */ + DeletePackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeletePackageRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeletePackageRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeletePackageRequest} message DeletePackageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePackageRequest.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 DeletePackageRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeletePackageRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePackageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeletePackageRequest; + })(); + + v1.Repository = (function() { + + /** + * Properties of a Repository. + * @memberof google.devtools.artifactregistry.v1 + * @interface IRepository + * @property {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null} [mavenConfig] Repository mavenConfig + * @property {string|null} [name] Repository name + * @property {google.devtools.artifactregistry.v1.Repository.Format|null} [format] Repository format + * @property {string|null} [description] Repository description + * @property {Object.|null} [labels] Repository labels + * @property {google.protobuf.ITimestamp|null} [createTime] Repository createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Repository updateTime + * @property {string|null} [kmsKeyName] Repository kmsKeyName + */ + + /** + * Constructs a new Repository. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Repository. + * @implements IRepository + * @constructor + * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set + */ + function Repository(properties) { + this.labels = {}; + 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]]; + } + + /** + * Repository mavenConfig. + * @member {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig|null|undefined} mavenConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.mavenConfig = null; + + /** + * Repository name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.name = ""; + + /** + * Repository format. + * @member {google.devtools.artifactregistry.v1.Repository.Format} format + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.format = 0; + + /** + * Repository description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.description = ""; + + /** + * Repository labels. + * @member {Object.} labels + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.labels = $util.emptyObject; + + /** + * Repository createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.createTime = null; + + /** + * Repository updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.updateTime = null; + + /** + * Repository kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Repository.prototype.kmsKeyName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Repository formatConfig. + * @member {"mavenConfig"|undefined} formatConfig + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + */ + Object.defineProperty(Repository.prototype, "formatConfig", { + get: $util.oneOfGetter($oneOfFields = ["mavenConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Repository instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.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.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.kmsKeyName); + if (message.mavenConfig != null && Object.hasOwnProperty.call(message, "mavenConfig")) + $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.encode(message.mavenConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.IRepository} message Repository message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Repository.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Repository message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.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.devtools.artifactregistry.v1.Repository(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: + message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.decode(reader, reader.uint32()); + break; + case 1: + message.name = reader.string(); + break; + case 2: + message.format = reader.int32(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.kmsKeyName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Repository message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Repository.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Repository message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Repository.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { + properties.formatConfig = 1; + { + var error = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify(message.mavenConfig); + if (error) + return "mavenConfig." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + case 8: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates a Repository message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository} Repository + */ + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository(); + if (object.mavenConfig != null) { + if (typeof object.mavenConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.mavenConfig: object expected"); + message.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.fromObject(object.mavenConfig); + } + if (object.name != null) + message.name = String(object.name); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "DOCKER": + case 1: + message.format = 1; + break; + case "MAVEN": + case 2: + message.format = 2; + break; + case "NPM": + case 3: + message.format = 3; + break; + case "APT": + case 5: + message.format = 5; + break; + case "YUM": + case 6: + message.format = 6; + break; + case "PYTHON": + case 8: + message.format = 8; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Repository.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from a Repository message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository + * @static + * @param {google.devtools.artifactregistry.v1.Repository} message Repository + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Repository.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.kmsKeyName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.Format[message.format] : message.format; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + 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.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + if (message.mavenConfig != null && message.hasOwnProperty("mavenConfig")) { + object.mavenConfig = $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.toObject(message.mavenConfig, options); + if (options.oneofs) + object.formatConfig = "mavenConfig"; + } + return object; + }; + + /** + * Converts this Repository to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository + * @instance + * @returns {Object.} JSON object + */ + Repository.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Repository.MavenRepositoryConfig = (function() { + + /** + * Properties of a MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @interface IMavenRepositoryConfig + * @property {boolean|null} [allowSnapshotOverwrites] MavenRepositoryConfig allowSnapshotOverwrites + * @property {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy|null} [versionPolicy] MavenRepositoryConfig versionPolicy + */ + + /** + * Constructs a new MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1.Repository + * @classdesc Represents a MavenRepositoryConfig. + * @implements IMavenRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set + */ + function MavenRepositoryConfig(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]]; + } + + /** + * MavenRepositoryConfig allowSnapshotOverwrites. + * @member {boolean} allowSnapshotOverwrites + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.allowSnapshotOverwrites = false; + + /** + * MavenRepositoryConfig versionPolicy. + * @member {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy} versionPolicy + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.versionPolicy = 0; + + /** + * Creates a new MavenRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig instance + */ + MavenRepositoryConfig.create = function create(properties) { + return new MavenRepositoryConfig(properties); + }; + + /** + * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepositoryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowSnapshotOverwrites != null && Object.hasOwnProperty.call(message, "allowSnapshotOverwrites")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowSnapshotOverwrites); + if (message.versionPolicy != null && Object.hasOwnProperty.call(message, "versionPolicy")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.versionPolicy); + return writer; + }; + + /** + * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.IMavenRepositoryConfig} message MavenRepositoryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenRepositoryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepositoryConfig.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.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allowSnapshotOverwrites = reader.bool(); + break; + case 2: + message.versionPolicy = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MavenRepositoryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenRepositoryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MavenRepositoryConfig message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MavenRepositoryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) + if (typeof message.allowSnapshotOverwrites !== "boolean") + return "allowSnapshotOverwrites: boolean expected"; + if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) + switch (message.versionPolicy) { + default: + return "versionPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a MavenRepositoryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} MavenRepositoryConfig + */ + MavenRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig(); + if (object.allowSnapshotOverwrites != null) + message.allowSnapshotOverwrites = Boolean(object.allowSnapshotOverwrites); + switch (object.versionPolicy) { + case "VERSION_POLICY_UNSPECIFIED": + case 0: + message.versionPolicy = 0; + break; + case "RELEASE": + case 1: + message.versionPolicy = 1; + break; + case "SNAPSHOT": + case 2: + message.versionPolicy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a MavenRepositoryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig} message MavenRepositoryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MavenRepositoryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowSnapshotOverwrites = false; + object.versionPolicy = options.enums === String ? "VERSION_POLICY_UNSPECIFIED" : 0; + } + if (message.allowSnapshotOverwrites != null && message.hasOwnProperty("allowSnapshotOverwrites")) + object.allowSnapshotOverwrites = message.allowSnapshotOverwrites; + if (message.versionPolicy != null && message.hasOwnProperty("versionPolicy")) + object.versionPolicy = options.enums === String ? $root.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] : message.versionPolicy; + return object; + }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig + * @instance + * @returns {Object.} JSON object + */ + MavenRepositoryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VersionPolicy enum. + * @name google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig.VersionPolicy + * @enum {number} + * @property {number} VERSION_POLICY_UNSPECIFIED=0 VERSION_POLICY_UNSPECIFIED value + * @property {number} RELEASE=1 RELEASE value + * @property {number} SNAPSHOT=2 SNAPSHOT value + */ + MavenRepositoryConfig.VersionPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RELEASE"] = 1; + values[valuesById[2] = "SNAPSHOT"] = 2; + return values; + })(); + + return MavenRepositoryConfig; + })(); + + /** + * Format enum. + * @name google.devtools.artifactregistry.v1.Repository.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} DOCKER=1 DOCKER value + * @property {number} MAVEN=2 MAVEN value + * @property {number} NPM=3 NPM value + * @property {number} APT=5 APT value + * @property {number} YUM=6 YUM value + * @property {number} PYTHON=8 PYTHON value + */ + Repository.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCKER"] = 1; + values[valuesById[2] = "MAVEN"] = 2; + values[valuesById[3] = "NPM"] = 3; + values[valuesById[5] = "APT"] = 5; + values[valuesById[6] = "YUM"] = 6; + values[valuesById[8] = "PYTHON"] = 8; + return values; + })(); + + return Repository; + })(); + + v1.ListRepositoriesRequest = (function() { + + /** + * Properties of a ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + */ + + /** + * Constructs a new ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set + */ + function ListRepositoriesRequest(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]]; + } + + /** + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.parent = ""; + + /** + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageSize = 0; + + /** + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + */ + ListRepositoriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest instance + */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.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 ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.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.devtools.artifactregistry.v1.ListRepositoriesRequest(); + 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 ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesRequest.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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesRequest} ListRepositoriesRequest + */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest(); + 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 ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesRequest.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 ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesRequest; + })(); + + v1.ListRepositoriesResponse = (function() { + + /** + * Properties of a ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + */ + + /** + * Constructs a new ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set + */ + function ListRepositoriesResponse(properties) { + this.repositories = []; + 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]]; + } + + /** + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + + /** + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + */ + ListRepositoriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse instance + */ + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repositories != null && message.repositories.length) + for (var i = 0; i < message.repositories.length; ++i) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repositories[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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.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.devtools.artifactregistry.v1.ListRepositoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.repositories && message.repositories.length)) + message.repositories = []; + message.repositories.push($root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRepositoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRepositoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repositories != null && message.hasOwnProperty("repositories")) { + if (!Array.isArray(message.repositories)) + return "repositories: array expected"; + for (var i = 0; i < message.repositories.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repositories[i]); + if (error) + return "repositories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListRepositoriesResponse} ListRepositoriesResponse + */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: array expected"); + message.repositories = []; + for (var i = 0; i < object.repositories.length; ++i) { + if (typeof object.repositories[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRepositoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repositories = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.repositories && message.repositories.length) { + object.repositories = []; + for (var j = 0; j < message.repositories.length; ++j) + object.repositories[j] = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListRepositoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesResponse; + })(); + + v1.GetRepositoryRequest = (function() { + + /** + * Properties of a GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name + */ + + /** + * Constructs a new GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set + */ + function GetRepositoryRequest(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]]; + } + + /** + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @instance + */ + GetRepositoryRequest.prototype.name = ""; + + /** + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest instance + */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.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 GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.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.devtools.artifactregistry.v1.GetRepositoryRequest(); + 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 GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRepositoryRequest.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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetRepositoryRequest} GetRepositoryRequest + */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRepositoryRequest.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 GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRepositoryRequest; + })(); + + v1.CreateRepositoryRequest = (function() { + + /** + * Properties of a CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] CreateRepositoryRequest repository + */ + + /** + * Constructs a new CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set + */ + function CreateRepositoryRequest(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]]; + } + + /** + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.parent = ""; + + /** + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repositoryId = ""; + + /** + * CreateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + */ + CreateRepositoryRequest.prototype.repository = null; + + /** + * Creates a new CreateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest instance + */ + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); + }; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.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.repositoryId != null && Object.hasOwnProperty.call(message, "repositoryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryId); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.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.devtools.artifactregistry.v1.CreateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.repositoryId = reader.string(); + break; + case 3: + message.repository = $root.google.devtools.artifactregistry.v1.Repository.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateRepositoryRequest.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.repositoryId != null && message.hasOwnProperty("repositoryId")) + if (!$util.isString(message.repositoryId)) + return "repositoryId: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateRepositoryRequest} CreateRepositoryRequest + */ + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.repositoryId != null) + message.repositoryId = String(object.repositoryId); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); + } + return message; + }; + + /** + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.repositoryId = ""; + object.repository = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.repositoryId != null && message.hasOwnProperty("repositoryId")) + object.repositoryId = message.repositoryId; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); + return object; + }; + + /** + * Converts this CreateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateRepositoryRequest; + })(); + + v1.UpdateRepositoryRequest = (function() { + + /** + * Properties of an UpdateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateRepositoryRequest + * @property {google.devtools.artifactregistry.v1.IRepository|null} [repository] UpdateRepositoryRequest repository + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + */ + + /** + * Constructs a new UpdateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set + */ + function UpdateRepositoryRequest(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]]; + } + + /** + * UpdateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.repository = null; + + /** + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + */ + UpdateRepositoryRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest instance + */ + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); + }; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.artifactregistry.v1.Repository.encode(message.repository, 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 UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.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.devtools.artifactregistry.v1.UpdateRepositoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.repository = $root.google.devtools.artifactregistry.v1.Repository.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 UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateRepositoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1.Repository.verify(message.repository); + if (error) + return "repository." + 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 UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} UpdateRepositoryRequest + */ + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest(); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1.Repository.fromObject(object.repository); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateRepositoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repository = null; + object.updateMask = null; + } + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1.Repository.toObject(message.repository, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateRepositoryRequest; + })(); + + v1.DeleteRepositoryRequest = (function() { + + /** + * Properties of a DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name + */ + + /** + * Constructs a new DeleteRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set + */ + function DeleteRepositoryRequest(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]]; + } + + /** + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @instance + */ + DeleteRepositoryRequest.prototype.name = ""; + + /** + * Creates a new DeleteRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest instance + */ + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); + }; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.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 DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.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.devtools.artifactregistry.v1.DeleteRepositoryRequest(); + 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 DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteRepositoryRequest.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 DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} DeleteRepositoryRequest + */ + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteRepositoryRequest.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 DeleteRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteRepositoryRequest; + })(); + + v1.ArtifactRegistry = (function() { + + /** + * Constructs a new ArtifactRegistry service. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ArtifactRegistry + * @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 ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; + + /** + * Creates new ArtifactRegistry service using the specified rpc implementation. + * @function create + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @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 {ArtifactRegistry} RPC service. Useful where requests and/or responses are streamed. + */ + ArtifactRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listDockerImages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListDockerImagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} [response] ListDockerImagesResponse + */ + + /** + * Calls ListDockerImages. + * @function listDockerImages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback} callback Node-style callback called with the error, if any, and ListDockerImagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listDockerImages = function listDockerImages(request, callback) { + return this.rpcCall(listDockerImages, $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest, $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse, request, callback); + }, "name", { value: "ListDockerImages" }); + + /** + * Calls ListDockerImages. + * @function listDockerImages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getDockerImage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetDockerImageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.DockerImage} [response] DockerImage + */ + + /** + * Calls GetDockerImage. + * @function getDockerImage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImageCallback} callback Node-style callback called with the error, if any, and DockerImage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getDockerImage = function getDockerImage(request, callback) { + return this.rpcCall(getDockerImage, $root.google.devtools.artifactregistry.v1.GetDockerImageRequest, $root.google.devtools.artifactregistry.v1.DockerImage, request, callback); + }, "name", { value: "GetDockerImage" }); + + /** + * Calls GetDockerImage. + * @function getDockerImage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetDockerImageRequest} request GetDockerImageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#importAptArtifacts}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ImportAptArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.importAptArtifacts = function importAptArtifacts(request, callback) { + return this.rpcCall(importAptArtifacts, $root.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportAptArtifacts" }); + + /** + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#importYumArtifacts}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ImportYumArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.importYumArtifacts = function importYumArtifacts(request, callback) { + return this.rpcCall(importYumArtifacts, $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportYumArtifacts" }); + + /** + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listRepositories}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} [response] ListRepositoriesResponse + */ + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); + + /** + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository + */ + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.devtools.artifactregistry.v1.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); + }, "name", { value: "GetRepository" }); + + /** + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#createRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.devtools.artifactregistry.v1.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRepository" }); + + /** + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository + */ + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.devtools.artifactregistry.v1.UpdateRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); + + /** + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteRepository}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.devtools.artifactregistry.v1.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteRepository" }); + + /** + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listPackages}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListPackagesResponse} [response] ListPackagesResponse + */ + + /** + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackagesCallback} callback Node-style callback called with the error, if any, and ListPackagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listPackages = function listPackages(request, callback) { + return this.rpcCall(listPackages, $root.google.devtools.artifactregistry.v1.ListPackagesRequest, $root.google.devtools.artifactregistry.v1.ListPackagesResponse, request, callback); + }, "name", { value: "ListPackages" }); + + /** + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListPackagesRequest} request ListPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getPackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetPackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Package} [response] Package + */ + + /** + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackageCallback} callback Node-style callback called with the error, if any, and Package + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getPackage = function getPackage(request, callback) { + return this.rpcCall(getPackage, $root.google.devtools.artifactregistry.v1.GetPackageRequest, $root.google.devtools.artifactregistry.v1.Package, request, callback); + }, "name", { value: "GetPackage" }); + + /** + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetPackageRequest} request GetPackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deletePackage}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeletePackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackageCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deletePackage = function deletePackage(request, callback) { + return this.rpcCall(deletePackage, $root.google.devtools.artifactregistry.v1.DeletePackageRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePackage" }); + + /** + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listVersions}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} [response] ListVersionsResponse + */ + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.devtools.artifactregistry.v1.ListVersionsRequest, $root.google.devtools.artifactregistry.v1.ListVersionsResponse, request, callback); + }, "name", { value: "ListVersions" }); + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getVersion}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Version} [response] Version + */ + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.devtools.artifactregistry.v1.GetVersionRequest, $root.google.devtools.artifactregistry.v1.Version, request, callback); + }, "name", { value: "GetVersion" }); + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteVersion}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.devtools.artifactregistry.v1.DeleteVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVersion" }); + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listFiles}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListFilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListFilesResponse} [response] ListFilesResponse + */ + + /** + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListFilesCallback} callback Node-style callback called with the error, if any, and ListFilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listFiles = function listFiles(request, callback) { + return this.rpcCall(listFiles, $root.google.devtools.artifactregistry.v1.ListFilesRequest, $root.google.devtools.artifactregistry.v1.ListFilesResponse, request, callback); + }, "name", { value: "ListFiles" }); + + /** + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListFilesRequest} request ListFilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getFile}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.File} [response] File + */ + + /** + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetFileCallback} callback Node-style callback called with the error, if any, and File + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getFile = function getFile(request, callback) { + return this.rpcCall(getFile, $root.google.devtools.artifactregistry.v1.GetFileRequest, $root.google.devtools.artifactregistry.v1.File, request, callback); + }, "name", { value: "GetFile" }); + + /** + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetFileRequest} request GetFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listTags}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef ListTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ListTagsResponse} [response] ListTagsResponse + */ + + /** + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.listTags = function listTags(request, callback) { + return this.rpcCall(listTags, $root.google.devtools.artifactregistry.v1.ListTagsRequest, $root.google.devtools.artifactregistry.v1.ListTagsResponse, request, callback); + }, "name", { value: "ListTags" }); + + /** + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} request ListTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getTag = function getTag(request, callback) { + return this.rpcCall(getTag, $root.google.devtools.artifactregistry.v1.GetTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "GetTag" }); + + /** + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} request GetTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#createTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef CreateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.createTag = function createTag(request, callback) { + return this.rpcCall(createTag, $root.google.devtools.artifactregistry.v1.CreateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "CreateTag" }); + + /** + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} request CreateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.Tag} [response] Tag + */ + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateTag = function updateTag(request, callback) { + return this.rpcCall(updateTag, $root.google.devtools.artifactregistry.v1.UpdateTagRequest, $root.google.devtools.artifactregistry.v1.Tag, request, callback); + }, "name", { value: "UpdateTag" }); + + /** + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#deleteTag}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef DeleteTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.deleteTag = function deleteTag(request, callback) { + return this.rpcCall(deleteTag, $root.google.devtools.artifactregistry.v1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTag" }); + + /** + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#setIamPolicy}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getIamPolicy}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#testIamPermissions}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getProjectSettings}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef GetProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.getProjectSettings = function getProjectSettings(request, callback) { + return this.rpcCall(getProjectSettings, $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); + }, "name", { value: "GetProjectSettings" }); + + /** + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#updateProjectSettings}. + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @typedef UpdateProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ArtifactRegistry.prototype.updateProjectSettings = function updateProjectSettings(request, callback) { + return this.rpcCall(updateProjectSettings, $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest, $root.google.devtools.artifactregistry.v1.ProjectSettings, request, callback); + }, "name", { value: "UpdateProjectSettings" }); + + /** + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ArtifactRegistry; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @interface IOperationMetadata + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(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]]; + } + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.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.devtools.artifactregistry.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.OperationMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1.OperationMetadata(); + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @static + * @param {google.devtools.artifactregistry.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + v1.ProjectSettings = (function() { + + /** + * Properties of a ProjectSettings. + * @memberof google.devtools.artifactregistry.v1 + * @interface IProjectSettings + * @property {string|null} [name] ProjectSettings name + * @property {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState + */ + + /** + * Constructs a new ProjectSettings. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ProjectSettings. + * @implements IProjectSettings + * @constructor + * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set + */ + function ProjectSettings(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]]; + } + + /** + * ProjectSettings name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + */ + ProjectSettings.prototype.name = ""; + + /** + * ProjectSettings legacyRedirectionState. + * @member {google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState} legacyRedirectionState + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + */ + ProjectSettings.prototype.legacyRedirectionState = 0; + + /** + * Creates a new ProjectSettings instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings instance + */ + ProjectSettings.create = function create(properties) { + return new ProjectSettings(properties); + }; + + /** + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectSettings.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.legacyRedirectionState != null && Object.hasOwnProperty.call(message, "legacyRedirectionState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.legacyRedirectionState); + return writer; + }; + + /** + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ProjectSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.IProjectSettings} message ProjectSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectSettings.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.devtools.artifactregistry.v1.ProjectSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.legacyRedirectionState = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProjectSettings message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectSettings.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"; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + switch (message.legacyRedirectionState) { + default: + return "legacyRedirectionState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ProjectSettings} ProjectSettings + */ + ProjectSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ProjectSettings) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ProjectSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.legacyRedirectionState) { + case "REDIRECTION_STATE_UNSPECIFIED": + case 0: + message.legacyRedirectionState = 0; + break; + case "REDIRECTION_FROM_GCR_IO_DISABLED": + case 1: + message.legacyRedirectionState = 1; + break; + case "REDIRECTION_FROM_GCR_IO_ENABLED": + case 2: + message.legacyRedirectionState = 2; + break; + case "REDIRECTION_FROM_GCR_IO_FINALIZED": + case 3: + message.legacyRedirectionState = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @static + * @param {google.devtools.artifactregistry.v1.ProjectSettings} message ProjectSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProjectSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.legacyRedirectionState != null && message.hasOwnProperty("legacyRedirectionState")) + object.legacyRedirectionState = options.enums === String ? $root.google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; + return object; + }; + + /** + * Converts this ProjectSettings to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ProjectSettings + * @instance + * @returns {Object.} JSON object + */ + ProjectSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * RedirectionState enum. + * @name google.devtools.artifactregistry.v1.ProjectSettings.RedirectionState + * @enum {number} + * @property {number} REDIRECTION_STATE_UNSPECIFIED=0 REDIRECTION_STATE_UNSPECIFIED value + * @property {number} REDIRECTION_FROM_GCR_IO_DISABLED=1 REDIRECTION_FROM_GCR_IO_DISABLED value + * @property {number} REDIRECTION_FROM_GCR_IO_ENABLED=2 REDIRECTION_FROM_GCR_IO_ENABLED value + * @property {number} REDIRECTION_FROM_GCR_IO_FINALIZED=3 REDIRECTION_FROM_GCR_IO_FINALIZED value + */ + ProjectSettings.RedirectionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDIRECTION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REDIRECTION_FROM_GCR_IO_DISABLED"] = 1; + values[valuesById[2] = "REDIRECTION_FROM_GCR_IO_ENABLED"] = 2; + values[valuesById[3] = "REDIRECTION_FROM_GCR_IO_FINALIZED"] = 3; + return values; + })(); + + return ProjectSettings; + })(); + + v1.GetProjectSettingsRequest = (function() { + + /** + * Properties of a GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetProjectSettingsRequest + * @property {string|null} [name] GetProjectSettingsRequest name + */ + + /** + * Constructs a new GetProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetProjectSettingsRequest. + * @implements IGetProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set + */ + function GetProjectSettingsRequest(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]]; + } + + /** + * GetProjectSettingsRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @instance + */ + GetProjectSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest instance + */ + GetProjectSettingsRequest.create = function create(properties) { + return new GetProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectSettingsRequest.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 GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectSettingsRequest.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.devtools.artifactregistry.v1.GetProjectSettingsRequest(); + 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 GetProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectSettingsRequest.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 GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} GetProjectSettingsRequest + */ + GetProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetProjectSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetProjectSettingsRequest} message GetProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectSettingsRequest.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 GetProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetProjectSettingsRequest; + })(); + + v1.UpdateProjectSettingsRequest = (function() { + + /** + * Properties of an UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateProjectSettingsRequest + * @property {google.devtools.artifactregistry.v1.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateProjectSettingsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateProjectSettingsRequest. + * @implements IUpdateProjectSettingsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set + */ + function UpdateProjectSettingsRequest(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]]; + } + + /** + * UpdateProjectSettingsRequest projectSettings. + * @member {google.devtools.artifactregistry.v1.IProjectSettings|null|undefined} projectSettings + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.projectSettings = null; + + /** + * UpdateProjectSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + */ + UpdateProjectSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance + */ + UpdateProjectSettingsRequest.create = function create(properties) { + return new UpdateProjectSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProjectSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectSettings != null && Object.hasOwnProperty.call(message, "projectSettings")) + $root.google.devtools.artifactregistry.v1.ProjectSettings.encode(message.projectSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProjectSettingsRequest.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.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateProjectSettingsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateProjectSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { + var error = $root.google.devtools.artifactregistry.v1.ProjectSettings.verify(message.projectSettings); + if (error) + return "projectSettings." + 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 UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest + */ + UpdateProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest(); + if (object.projectSettings != null) { + if (typeof object.projectSettings !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.projectSettings: object expected"); + message.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.fromObject(object.projectSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateProjectSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectSettings = null; + object.updateMask = null; + } + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) + object.projectSettings = $root.google.devtools.artifactregistry.v1.ProjectSettings.toObject(message.projectSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateProjectSettingsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateProjectSettingsRequest; + })(); + + v1.Tag = (function() { + + /** + * Properties of a Tag. + * @memberof google.devtools.artifactregistry.v1 + * @interface ITag + * @property {string|null} [name] Tag name + * @property {string|null} [version] Tag version + */ + + /** + * Constructs a new Tag. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Tag. + * @implements ITag + * @constructor + * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set + */ + function Tag(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]]; + } + + /** + * Tag name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + */ + Tag.prototype.name = ""; + + /** + * Tag version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + */ + Tag.prototype.version = ""; + + /** + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Tag} Tag instance + */ + Tag.create = function create(properties) { + return new Tag(properties); + }; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.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.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.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.devtools.artifactregistry.v1.Tag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tag message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tag.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"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Tag} Tag + */ + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Tag) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Tag(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Tag + * @static + * @param {google.devtools.artifactregistry.v1.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Tag to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Tag + * @instance + * @returns {Object.} JSON object + */ + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tag; + })(); + + v1.ListTagsRequest = (function() { + + /** + * Properties of a ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListTagsRequest + * @property {string|null} [parent] ListTagsRequest parent + * @property {string|null} [filter] ListTagsRequest filter + * @property {number|null} [pageSize] ListTagsRequest pageSize + * @property {string|null} [pageToken] ListTagsRequest pageToken + */ + + /** + * Constructs a new ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListTagsRequest. + * @implements IListTagsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set + */ + function ListTagsRequest(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]]; + } + + /** + * ListTagsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.parent = ""; + + /** + * ListTagsRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.filter = ""; + + /** + * ListTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageSize = 0; + + /** + * ListTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest instance + */ + ListTagsRequest.create = function create(properties) { + return new ListTagsRequest(properties); + }; + + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsRequest.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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsRequest.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.devtools.artifactregistry.v1.ListTagsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 4: + message.filter = 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 ListTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListTagsRequest} ListTagsRequest + */ + ListTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListTagsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + 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 ListTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListTagsRequest} message ListTagsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListTagsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListTagsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTagsRequest; + })(); + + v1.ListTagsResponse = (function() { + + /** + * Properties of a ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListTagsResponse + * @property {Array.|null} [tags] ListTagsResponse tags + * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken + */ + + /** + * Constructs a new ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListTagsResponse. + * @implements IListTagsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set + */ + function ListTagsResponse(properties) { + this.tags = []; + 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]]; + } + + /** + * ListTagsResponse tags. + * @member {Array.} tags + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.tags = $util.emptyArray; + + /** + * ListTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse instance + */ + ListTagsResponse.create = function create(properties) { + return new ListTagsResponse(properties); + }; + + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tags[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 ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsResponse.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.devtools.artifactregistry.v1.ListTagsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tags[i]); + if (error) + return "tags." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListTagsResponse} ListTagsResponse + */ + ListTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListTagsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListTagsResponse(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListTagsResponse.tags: object expected"); + message.tags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tags[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListTagsResponse} message ListTagsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tags = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tags[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTagsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTagsResponse; + })(); + + v1.GetTagRequest = (function() { + + /** + * Properties of a GetTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetTagRequest + * @property {string|null} [name] GetTagRequest name + */ + + /** + * Constructs a new GetTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetTagRequest. + * @implements IGetTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set + */ + function GetTagRequest(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]]; + } + + /** + * GetTagRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @instance + */ + GetTagRequest.prototype.name = ""; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest instance + */ + GetTagRequest.create = function create(properties) { + return new GetTagRequest(properties); + }; + + /** + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagRequest.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 GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetTagRequest} message GetTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagRequest.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.devtools.artifactregistry.v1.GetTagRequest(); + 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 GetTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTagRequest.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 GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetTagRequest} GetTagRequest + */ + GetTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetTagRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetTagRequest} message GetTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTagRequest.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 GetTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetTagRequest + * @instance + * @returns {Object.} JSON object + */ + GetTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTagRequest; + })(); + + v1.CreateTagRequest = (function() { + + /** + * Properties of a CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface ICreateTagRequest + * @property {string|null} [parent] CreateTagRequest parent + * @property {string|null} [tagId] CreateTagRequest tagId + * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] CreateTagRequest tag + */ + + /** + * Constructs a new CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a CreateTagRequest. + * @implements ICreateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set + */ + function CreateTagRequest(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]]; + } + + /** + * CreateTagRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.parent = ""; + + /** + * CreateTagRequest tagId. + * @member {string} tagId + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tagId = ""; + + /** + * CreateTagRequest tag. + * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tag = null; + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest instance + */ + CreateTagRequest.create = function create(properties) { + return new CreateTagRequest(properties); + }; + + /** + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagRequest.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.tagId != null && Object.hasOwnProperty.call(message, "tagId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagId); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.CreateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagRequest.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.devtools.artifactregistry.v1.CreateTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.tagId = reader.string(); + break; + case 3: + message.tag = $root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTagRequest.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.tagId != null && message.hasOwnProperty("tagId")) + if (!$util.isString(message.tagId)) + return "tagId: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); + if (error) + return "tag." + error; + } + return null; + }; + + /** + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.CreateTagRequest} CreateTagRequest + */ + CreateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.CreateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.CreateTagRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagId != null) + message.tagId = String(object.tagId); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.CreateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); + } + return message; + }; + + /** + * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.CreateTagRequest} message CreateTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tagId = ""; + object.tag = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagId != null && message.hasOwnProperty("tagId")) + object.tagId = message.tagId; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); + return object; + }; + + /** + * Converts this CreateTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.CreateTagRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTagRequest; + })(); + + v1.UpdateTagRequest = (function() { + + /** + * Properties of an UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IUpdateTagRequest + * @property {google.devtools.artifactregistry.v1.ITag|null} [tag] UpdateTagRequest tag + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask + */ + + /** + * Constructs a new UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an UpdateTagRequest. + * @implements IUpdateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set + */ + function UpdateTagRequest(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]]; + } + + /** + * UpdateTagRequest tag. + * @member {google.devtools.artifactregistry.v1.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.tag = null; + + /** + * UpdateTagRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest instance + */ + UpdateTagRequest.create = function create(properties) { + return new UpdateTagRequest(properties); + }; + + /** + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.tag, 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 UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.UpdateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTagRequest.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.devtools.artifactregistry.v1.UpdateTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tag = $root.google.devtools.artifactregistry.v1.Tag.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 UpdateTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.tag); + if (error) + return "tag." + 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.UpdateTagRequest} UpdateTagRequest + */ + UpdateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.UpdateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.UpdateTagRequest(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.tag); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.UpdateTagRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.UpdateTagRequest} message UpdateTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = null; + object.updateMask = null; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.tag, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.UpdateTagRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTagRequest; + })(); + + v1.DeleteTagRequest = (function() { + + /** + * Properties of a DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteTagRequest + * @property {string|null} [name] DeleteTagRequest name + */ + + /** + * Constructs a new DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteTagRequest. + * @implements IDeleteTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set + */ + function DeleteTagRequest(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]]; + } + + /** + * DeleteTagRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @instance + */ + DeleteTagRequest.prototype.name = ""; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest instance + */ + DeleteTagRequest.create = function create(properties) { + return new DeleteTagRequest(properties); + }; + + /** + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagRequest.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 DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagRequest.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.devtools.artifactregistry.v1.DeleteTagRequest(); + 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 DeleteTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTagRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTagRequest.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 DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteTagRequest} DeleteTagRequest + */ + DeleteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteTagRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteTagRequest} message DeleteTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTagRequest.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 DeleteTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteTagRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteTagRequest; + })(); + + /** + * VersionView enum. + * @name google.devtools.artifactregistry.v1.VersionView + * @enum {number} + * @property {number} VERSION_VIEW_UNSPECIFIED=0 VERSION_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + v1.VersionView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + v1.Version = (function() { + + /** + * Properties of a Version. + * @memberof google.devtools.artifactregistry.v1 + * @interface IVersion + * @property {string|null} [name] Version name + * @property {string|null} [description] Version description + * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Version updateTime + * @property {Array.|null} [relatedTags] Version relatedTags + * @property {google.protobuf.IStruct|null} [metadata] Version metadata + */ + + /** + * Constructs a new Version. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set + */ + function Version(properties) { + this.relatedTags = []; + 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]]; + } + + /** + * Version name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.name = ""; + + /** + * Version description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.description = ""; + + /** + * Version createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.createTime = null; + + /** + * Version updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.updateTime = null; + + /** + * Version relatedTags. + * @member {Array.} relatedTags + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.relatedTags = $util.emptyArray; + + /** + * Version metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + */ + Version.prototype.metadata = null; + + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; + + /** + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.relatedTags != null && message.relatedTags.length) + for (var i = 0; i < message.relatedTags.length; ++i) + $root.google.devtools.artifactregistry.v1.Tag.encode(message.relatedTags[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Version message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.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.devtools.artifactregistry.v1.Version(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.relatedTags && message.relatedTags.length)) + message.relatedTags = []; + message.relatedTags.push($root.google.devtools.artifactregistry.v1.Tag.decode(reader, reader.uint32())); + break; + case 8: + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Version message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Version.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"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + 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.relatedTags != null && message.hasOwnProperty("relatedTags")) { + if (!Array.isArray(message.relatedTags)) + return "relatedTags: array expected"; + for (var i = 0; i < message.relatedTags.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Tag.verify(message.relatedTags[i]); + if (error) + return "relatedTags." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.Version) + return object; + var message = new $root.google.devtools.artifactregistry.v1.Version(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.relatedTags) { + if (!Array.isArray(object.relatedTags)) + throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: array expected"); + message.relatedTags = []; + for (var i = 0; i < object.relatedTags.length; ++i) { + if (typeof object.relatedTags[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.relatedTags: object expected"); + message.relatedTags[i] = $root.google.devtools.artifactregistry.v1.Tag.fromObject(object.relatedTags[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.Version.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.Version + * @static + * @param {google.devtools.artifactregistry.v1.Version} message Version + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Version.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedTags = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.metadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.relatedTags && message.relatedTags.length) { + object.relatedTags = []; + for (var j = 0; j < message.relatedTags.length; ++j) + object.relatedTags[j] = $root.google.devtools.artifactregistry.v1.Tag.toObject(message.relatedTags[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this Version to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Version; + })(); + + v1.ListVersionsRequest = (function() { + + /** + * Properties of a ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {number|null} [pageSize] ListVersionsRequest pageSize + * @property {string|null} [pageToken] ListVersionsRequest pageToken + * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] ListVersionsRequest view + * @property {string|null} [orderBy] ListVersionsRequest orderBy + */ + + /** + * Constructs a new ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set + */ + function ListVersionsRequest(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]]; + } + + /** + * ListVersionsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.parent = ""; + + /** + * ListVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageSize = 0; + + /** + * ListVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageToken = ""; + + /** + * ListVersionsRequest view. + * @member {google.devtools.artifactregistry.v1.VersionView} view + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.view = 0; + + /** + * ListVersionsRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest instance + */ + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); + }; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.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.devtools.artifactregistry.v1.ListVersionsRequest(); + 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; + case 4: + message.view = reader.int32(); + break; + case 5: + message.orderBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVersionsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListVersionsRequest} ListVersionsRequest + */ + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListVersionsRequest(); + 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); + switch (object.view) { + case "VERSION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ListVersionsRequest} message ListVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; + object.orderBy = ""; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListVersionsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVersionsRequest; + })(); + + v1.ListVersionsResponse = (function() { + + /** + * Properties of a ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IListVersionsResponse + * @property {Array.|null} [versions] ListVersionsResponse versions + * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a ListVersionsResponse. + * @implements IListVersionsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set + */ + function ListVersionsResponse(properties) { + this.versions = []; + 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]]; + } + + /** + * ListVersionsResponse versions. + * @member {Array.} versions + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.versions = $util.emptyArray; + + /** + * ListVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse instance + */ + ListVersionsResponse.create = function create(properties) { + return new ListVersionsResponse(properties); + }; + + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + $root.google.devtools.artifactregistry.v1.Version.encode(message.versions[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 ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ListVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.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.devtools.artifactregistry.v1.ListVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.google.devtools.artifactregistry.v1.Version.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVersionsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.Version.verify(message.versions[i]); + if (error) + return "versions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ListVersionsResponse} ListVersionsResponse + */ + ListVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ListVersionsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ListVersionsResponse(); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ListVersionsResponse.versions: object expected"); + message.versions[i] = $root.google.devtools.artifactregistry.v1.Version.fromObject(object.versions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1.ListVersionsResponse} message ListVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.google.devtools.artifactregistry.v1.Version.toObject(message.versions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVersionsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ListVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVersionsResponse; + })(); + + v1.GetVersionRequest = (function() { + + /** + * Properties of a GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name + * @property {google.devtools.artifactregistry.v1.VersionView|null} [view] GetVersionRequest view + */ + + /** + * Constructs a new GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set + */ + function GetVersionRequest(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]]; + } + + /** + * GetVersionRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.name = ""; + + /** + * GetVersionRequest view. + * @member {google.devtools.artifactregistry.v1.VersionView} view + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.view = 0; + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest instance + */ + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); + }; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.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.devtools.artifactregistry.v1.GetVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVersionRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVersionRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.GetVersionRequest} GetVersionRequest + */ + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.GetVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.GetVersionRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "VERSION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.GetVersionRequest} message GetVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.devtools.artifactregistry.v1.VersionView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.GetVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetVersionRequest; + })(); + + v1.DeleteVersionRequest = (function() { + + /** + * Properties of a DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name + * @property {boolean|null} [force] DeleteVersionRequest force + */ + + /** + * Constructs a new DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + */ + function DeleteVersionRequest(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]]; + } + + /** + * DeleteVersionRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.name = ""; + + /** + * DeleteVersionRequest force. + * @member {boolean} force + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.force = false; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest instance + */ + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); + }; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.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.devtools.artifactregistry.v1.DeleteVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVersionRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVersionRequest.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"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.DeleteVersionRequest} DeleteVersionRequest + */ + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.DeleteVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.DeleteVersionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1.DeleteVersionRequest} message DeleteVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.DeleteVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteVersionRequest; + })(); + + v1.YumArtifact = (function() { + + /** + * Properties of a YumArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @interface IYumArtifact + * @property {string|null} [name] YumArtifact name + * @property {string|null} [packageName] YumArtifact packageName + * @property {google.devtools.artifactregistry.v1.YumArtifact.PackageType|null} [packageType] YumArtifact packageType + * @property {string|null} [architecture] YumArtifact architecture + */ + + /** + * Constructs a new YumArtifact. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents a YumArtifact. + * @implements IYumArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set + */ + function YumArtifact(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]]; + } + + /** + * YumArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.name = ""; + + /** + * YumArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.packageName = ""; + + /** + * YumArtifact packageType. + * @member {google.devtools.artifactregistry.v1.YumArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.packageType = 0; + + /** + * YumArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + */ + YumArtifact.prototype.architecture = ""; + + /** + * Creates a new YumArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact instance + */ + YumArtifact.create = function create(properties) { + return new YumArtifact(properties); + }; + + /** + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumArtifact.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.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.packageType); + if (message.architecture != null && Object.hasOwnProperty.call(message, "architecture")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.architecture); + return writer; + }; + + /** + * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.YumArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.IYumArtifact} message YumArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YumArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YumArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumArtifact.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.devtools.artifactregistry.v1.YumArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.packageName = reader.string(); + break; + case 3: + message.packageType = reader.int32(); + break; + case 4: + message.architecture = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YumArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YumArtifact message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YumArtifact.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"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + switch (message.packageType) { + default: + return "packageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.architecture != null && message.hasOwnProperty("architecture")) + if (!$util.isString(message.architecture)) + return "architecture: string expected"; + return null; + }; + + /** + * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.YumArtifact} YumArtifact + */ + YumArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.YumArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1.YumArtifact(); + if (object.name != null) + message.name = String(object.name); + if (object.packageName != null) + message.packageName = String(object.packageName); + switch (object.packageType) { + case "PACKAGE_TYPE_UNSPECIFIED": + case 0: + message.packageType = 0; + break; + case "BINARY": + case 1: + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 2; + break; + } + if (object.architecture != null) + message.architecture = String(object.architecture); + return message; + }; + + /** + * Creates a plain object from a YumArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1.YumArtifact} message YumArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YumArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.packageName = ""; + object.packageType = options.enums === String ? "PACKAGE_TYPE_UNSPECIFIED" : 0; + object.architecture = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = options.enums === String ? $root.google.devtools.artifactregistry.v1.YumArtifact.PackageType[message.packageType] : message.packageType; + if (message.architecture != null && message.hasOwnProperty("architecture")) + object.architecture = message.architecture; + return object; + }; + + /** + * Converts this YumArtifact to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.YumArtifact + * @instance + * @returns {Object.} JSON object + */ + YumArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PackageType enum. + * @name google.devtools.artifactregistry.v1.YumArtifact.PackageType + * @enum {number} + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value + */ + YumArtifact.PackageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; + return values; + })(); + + return YumArtifact; + })(); + + v1.ImportYumArtifactsGcsSource = (function() { + + /** + * Properties of an ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsGcsSource + * @property {Array.|null} [uris] ImportYumArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportYumArtifactsGcsSource useWildcards + */ + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsGcsSource. + * @implements IImportYumArtifactsGcsSource + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set + */ + function ImportYumArtifactsGcsSource(properties) { + this.uris = []; + 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]]; + } + + /** + * ImportYumArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.uris = $util.emptyArray; + + /** + * ImportYumArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.useWildcards = false; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource instance + */ + ImportYumArtifactsGcsSource.create = function create(properties) { + return new ImportYumArtifactsGcsSource(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsGcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uris[i]); + if (message.useWildcards != null && Object.hasOwnProperty.call(message, "useWildcards")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useWildcards); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsGcsSource.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.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + case 2: + message.useWildcards = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsGcsSource message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsGcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + if (typeof message.useWildcards !== "boolean") + return "useWildcards: boolean expected"; + return null; + }; + + /** + * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + */ + ImportYumArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} message ImportYumArtifactsGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsGcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uris = []; + if (options.defaults) + object.useWildcards = false; + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + object.useWildcards = message.useWildcards; + return object; + }; + + /** + * Converts this ImportYumArtifactsGcsSource to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsGcsSource; + })(); + + v1.ImportYumArtifactsRequest = (function() { + + /** + * Properties of an ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsRequest + * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsRequest gcsSource + * @property {string|null} [parent] ImportYumArtifactsRequest parent + */ + + /** + * Constructs a new ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsRequest. + * @implements IImportYumArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set + */ + function ImportYumArtifactsRequest(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]]; + } + + /** + * ImportYumArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + ImportYumArtifactsRequest.prototype.gcsSource = null; + + /** + * ImportYumArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + ImportYumArtifactsRequest.prototype.parent = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportYumArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + */ + Object.defineProperty(ImportYumArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportYumArtifactsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest instance + */ + ImportYumArtifactsRequest.create = function create(properties) { + return new ImportYumArtifactsRequest(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsRequest} message ImportYumArtifactsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsRequest.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.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); + break; + case 1: + message.parent = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} ImportYumArtifactsRequest + */ + ImportYumArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsRequest} message ImportYumArtifactsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + return object; + }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsRequest; + })(); + + v1.ImportYumArtifactsErrorInfo = (function() { + + /** + * Properties of an ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportYumArtifactsErrorInfo error + */ + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsErrorInfo. + * @implements IImportYumArtifactsErrorInfo + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set + */ + function ImportYumArtifactsErrorInfo(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]]; + } + + /** + * ImportYumArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + ImportYumArtifactsErrorInfo.prototype.gcsSource = null; + + /** + * ImportYumArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + ImportYumArtifactsErrorInfo.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportYumArtifactsErrorInfo source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + */ + Object.defineProperty(ImportYumArtifactsErrorInfo.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo instance + */ + ImportYumArtifactsErrorInfo.create = function create(properties) { + return new ImportYumArtifactsErrorInfo(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsErrorInfo.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.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.decode(reader, reader.uint32()); + break; + case 2: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsErrorInfo message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + return null; + }; + + /** + * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + */ + ImportYumArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo} message ImportYumArtifactsErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + return object; + }; + + /** + * Converts this ImportYumArtifactsErrorInfo to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsErrorInfo; + })(); + + v1.ImportYumArtifactsResponse = (function() { + + /** + * Properties of an ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @interface IImportYumArtifactsResponse + * @property {Array.|null} [yumArtifacts] ImportYumArtifactsResponse yumArtifacts + * @property {Array.|null} [errors] ImportYumArtifactsResponse errors + */ + + /** + * Constructs a new ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsResponse. + * @implements IImportYumArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set + */ + function ImportYumArtifactsResponse(properties) { + this.yumArtifacts = []; + this.errors = []; + 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]]; + } + + /** + * ImportYumArtifactsResponse yumArtifacts. + * @member {Array.} yumArtifacts + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.yumArtifacts = $util.emptyArray; + + /** + * ImportYumArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse instance + */ + ImportYumArtifactsResponse.create = function create(properties) { + return new ImportYumArtifactsResponse(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yumArtifacts != null && message.yumArtifacts.length) + for (var i = 0; i < message.yumArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1.YumArtifact.encode(message.yumArtifacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsResponse} message ImportYumArtifactsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsResponse.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.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.yumArtifacts && message.yumArtifacts.length)) + message.yumArtifacts = []; + message.yumArtifacts.push($root.google.devtools.artifactregistry.v1.YumArtifact.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportYumArtifactsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yumArtifacts != null && message.hasOwnProperty("yumArtifacts")) { + if (!Array.isArray(message.yumArtifacts)) + return "yumArtifacts: array expected"; + for (var i = 0; i < message.yumArtifacts.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.YumArtifact.verify(message.yumArtifacts[i]); + if (error) + return "yumArtifacts." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates an ImportYumArtifactsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} ImportYumArtifactsResponse + */ + ImportYumArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse(); + if (object.yumArtifacts) { + if (!Array.isArray(object.yumArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: array expected"); + message.yumArtifacts = []; + for (var i = 0; i < object.yumArtifacts.length; ++i) { + if (typeof object.yumArtifacts[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.yumArtifacts: object expected"); + message.yumArtifacts[i] = $root.google.devtools.artifactregistry.v1.YumArtifact.fromObject(object.yumArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.devtools.artifactregistry.v1.ImportYumArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ImportYumArtifactsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1.GetRepositoryRequest} message GetRepositoryRequest + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsResponse} message ImportYumArtifactsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRepositoryRequest.toObject = function toObject(message, options) { + ImportYumArtifactsResponse.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; + if (options.arrays || options.defaults) { + object.yumArtifacts = []; + object.errors = []; + } + if (message.yumArtifacts && message.yumArtifacts.length) { + object.yumArtifacts = []; + for (var j = 0; j < message.yumArtifacts.length; ++j) + object.yumArtifacts[j] = $root.google.devtools.artifactregistry.v1.YumArtifact.toObject(message.yumArtifacts[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.devtools.artifactregistry.v1.ImportYumArtifactsErrorInfo.toObject(message.errors[j], options); + } return object; }; /** - * Converts this GetRepositoryRequest to JSON. + * Converts this ImportYumArtifactsResponse to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsResponse * @instance * @returns {Object.} JSON object */ - GetRepositoryRequest.prototype.toJSON = function toJSON() { + ImportYumArtifactsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetRepositoryRequest; + return ImportYumArtifactsResponse; })(); - v1.ArtifactRegistry = (function() { + v1.ImportYumArtifactsMetadata = (function() { /** - * Constructs a new ArtifactRegistry service. + * Properties of an ImportYumArtifactsMetadata. * @memberof google.devtools.artifactregistry.v1 - * @classdesc Represents an ArtifactRegistry - * @extends $protobuf.rpc.Service + * @interface IImportYumArtifactsMetadata + */ + + /** + * Constructs a new ImportYumArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1 + * @classdesc Represents an ImportYumArtifactsMetadata. + * @implements IImportYumArtifactsMetadata * @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 + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata=} [properties] Properties to set */ - function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function ImportYumArtifactsMetadata(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]]; } - (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; - /** - * Creates new ArtifactRegistry service using the specified rpc implementation. + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata * @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 {ArtifactRegistry} RPC service. Useful where requests and/or responses are streamed. + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata instance */ - ArtifactRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + ImportYumArtifactsMetadata.create = function create(properties) { + return new ImportYumArtifactsMetadata(properties); }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listDockerImages}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListDockerImagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListDockerImagesResponse} [response] ListDockerImagesResponse - */ - - /** - * Calls ListDockerImages. - * @function listDockerImages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImagesCallback} callback Node-style callback called with the error, if any, and ListDockerImagesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ArtifactRegistry.prototype.listDockerImages = function listDockerImages(request, callback) { - return this.rpcCall(listDockerImages, $root.google.devtools.artifactregistry.v1.ListDockerImagesRequest, $root.google.devtools.artifactregistry.v1.ListDockerImagesResponse, request, callback); - }, "name", { value: "ListDockerImages" }); + ImportYumArtifactsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Calls ListDockerImages. - * @function listDockerImages - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListDockerImagesRequest} request ListDockerImagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ImportYumArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#listRepositories}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef ListRepositoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.ListRepositoriesResponse} [response] ListRepositoriesResponse + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ImportYumArtifactsMetadata.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.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse - * @returns {undefined} - * @variation 1 + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { - return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1.ListRepositoriesResponse, request, callback); - }, "name", { value: "ListRepositories" }); + ImportYumArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an ImportYumArtifactsMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ImportYumArtifactsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1.ArtifactRegistry#getRepository}. - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @typedef GetRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1.Repository} [response] Repository + * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata */ + ImportYumArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata(); + }; /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository - * @returns {undefined} - * @variation 1 + * Creates a plain object from an ImportYumArtifactsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata} message ImportYumArtifactsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ArtifactRegistry.prototype.getRepository = function getRepository(request, callback) { - return this.rpcCall(getRepository, $root.google.devtools.artifactregistry.v1.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1.Repository, request, callback); - }, "name", { value: "GetRepository" }); + ImportYumArtifactsMetadata.toObject = function toObject() { + return {}; + }; /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1.ArtifactRegistry + * Converts this ImportYumArtifactsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata * @instance - * @param {google.devtools.artifactregistry.v1.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ImportYumArtifactsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ArtifactRegistry; + return ImportYumArtifactsMetadata; })(); return v1; @@ -24170,7 +34985,226 @@ return Annotation; })(); - return GeneratedCodeInfo; + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; })(); protobuf.Timestamp = (function() { @@ -24397,25 +35431,25 @@ return Timestamp; })(); - protobuf.Any = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an Any. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Any. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Any(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24423,88 +35457,78 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Any.prototype.value = $util.newBuffer([]); + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Any instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Any.create = function create(properties) { - return new Any(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -24515,126 +35539,120 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.FieldMask} FieldMask */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } return message; }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Any to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return FieldMask; })(); - protobuf.Duration = (function() { + protobuf.Struct = (function() { /** - * Properties of a Duration. + * Properties of a Struct. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Duration. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Duration(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24642,88 +35660,97 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - Duration.prototype.nanos = 0; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; break; default: reader.skipType(tag & 7); @@ -24734,129 +35761,131 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Struct} Struct */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Duration to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Struct; })(); - protobuf.Empty = (function() { + protobuf.Value = (function() { /** - * Properties of an Empty. + * Properties of a Value. * @memberof google.protobuf - * @interface IEmpty + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new Empty. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Empty(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24864,63 +35893,155 @@ } /** - * Creates a new Empty instance using the specified properties. + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - Empty.create = function create(properties) { - return new Empty(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.nullValue = reader.int32(); + break; + case 2: + message.numberValue = reader.double(); + break; + case 3: + message.stringValue = reader.string(); + break; + case 4: + message.boolValue = reader.bool(); + break; + case 5: + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -24930,95 +36051,214 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Empty.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Empty.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } return null; }; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Value} Value */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return Value; })(); - protobuf.FieldMask = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a FieldMask. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new FieldMask. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25026,78 +36266,78 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -25108,120 +36348,125 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ListValue} ListValue */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } return object; }; /** - * Converts this FieldMask to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return ListValue; })(); - protobuf.Struct = (function() { + protobuf.Duration = (function() { /** - * Properties of a Struct. + * Properties of a Duration. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Struct. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25229,97 +36474,88 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - Struct.prototype.fields = $util.emptyObject; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Struct instance using the specified properties. + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -25330,131 +36566,129 @@ }; /** - * Decodes a Struct message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Struct.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Struct message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Struct.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Duration} Duration */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Struct to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Duration; })(); - protobuf.Value = (function() { + protobuf.Empty = (function() { /** - * Properties of a Value. + * Properties of an Empty. * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * @interface IEmpty */ /** - * Constructs a new Value. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Value(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25462,155 +36696,63 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Value.create = function create(properties) { - return new Value(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.nullValue = reader.int32(); - break; - case 2: - message.numberValue = reader.double(); - break; - case 3: - message.stringValue = reader.string(); - break; - case 4: - message.boolValue = reader.bool(); - break; - case 5: - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -25620,214 +36762,109 @@ }; /** - * Decodes a Value message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Value.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Value message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Value.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } return null; }; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Empty} Empty */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Value to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; + return Empty; })(); + return protobuf; + })(); + + google.rpc = (function() { + /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value + * Namespace rpc. + * @memberof google + * @namespace */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); + var rpc = {}; - protobuf.ListValue = (function() { + rpc.Status = (function() { /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25835,78 +36872,104 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - ListValue.prototype.values = $util.emptyArray; + Status.prototype.code = 0; /** - * Creates a new ListValue instance using the specified properties. + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encode = function encode(message, writer) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decode = function decode(reader, length) { + 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.protobuf.ListValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -25917,107 +36980,125 @@ }; /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListValue.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListValue message. + * Verifies a Status message. * @function verify - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListValue.verify = function verify(message) { + Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); if (error) - return "values." + error; + return "details." + error; } } return null; }; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.rpc.Status} Status */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); } } return message; }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; /** - * Converts this ListValue to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + return Status; })(); - return protobuf; + return rpc; })(); google.iam = (function() { @@ -26038,27 +37119,159 @@ */ var v1 = {}; - v1.Policy = (function() { + v1.IAMPolicy = (function() { /** - * Properties of a Policy. + * Constructs a new IAMPolicy service. * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Uint8Array|null} [etag] Policy etag + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; /** - * Constructs a new Policy. + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set */ - function Policy(properties) { - this.bindings = []; + function SetIamPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26066,104 +37279,88 @@ } /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest * @instance */ - Policy.prototype.bindings = $util.emptyArray; + SetIamPolicyRequest.prototype.resource = ""; /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest * @instance */ - Policy.prototype.etag = $util.newBuffer([]); + SetIamPolicyRequest.prototype.policy = null; /** - * Creates a new Policy instance using the specified properties. + * Creates a new SetIamPolicyRequest instance using the specified properties. * @function create - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance */ - Policy.create = function create(properties) { - return new Policy(properties); + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); }; /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Policy.encode = function encode(message, writer) { + SetIamPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Policy message from the specified reader or buffer. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Policy.decode = function decode(reader, length) { + SetIamPolicyRequest.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.iam.v1.Policy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.int32(); - break; - case 4: - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + message.resource = reader.string(); break; - case 3: - message.etag = reader.bytes(); + case 2: + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26174,154 +37371,122 @@ }; /** - * Decodes a Policy message from the specified reader or buffer, length delimited. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Policy.decodeDelimited = function decodeDelimited(reader) { + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Policy message. + * Verifies a SetIamPolicyRequest message. * @function verify - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Policy.verify = function verify(message) { + SetIamPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; return null; }; /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length) - message.etag = object.etag; return message; }; /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @static - * @param {google.iam.v1.Policy} message Policy + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Policy.toObject = function toObject(message, options) { + SetIamPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.bindings = []; if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + object.resource = ""; + object.policy = null; } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); return object; }; /** - * Converts this Policy to JSON. + * Converts this SetIamPolicyRequest to JSON. * @function toJSON - * @memberof google.iam.v1.Policy + * @memberof google.iam.v1.SetIamPolicyRequest * @instance * @returns {Object.} JSON object */ - Policy.prototype.toJSON = function toJSON() { + SetIamPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Policy; + return SetIamPolicyRequest; })(); - v1.Binding = (function() { + v1.GetIamPolicyRequest = (function() { /** - * Properties of a Binding. + * Properties of a GetIamPolicyRequest. * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options */ /** - * Constructs a new Binding. + * Constructs a new GetIamPolicyRequest. * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set */ - function Binding(properties) { - this.members = []; + function GetIamPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26329,104 +37494,88 @@ } /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest * @instance */ - Binding.prototype.members = $util.emptyArray; + GetIamPolicyRequest.prototype.resource = ""; /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest * @instance */ - Binding.prototype.condition = null; + GetIamPolicyRequest.prototype.options = null; /** - * Creates a new Binding instance using the specified properties. + * Creates a new GetIamPolicyRequest instance using the specified properties. * @function create - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance */ - Binding.create = function create(properties) { - return new Binding(properties); + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); }; /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Binding.encode = function encode(message, writer) { + GetIamPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Binding message from the specified reader or buffer. + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Binding.decode = function decode(reader, length) { + GetIamPolicyRequest.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.iam.v1.Binding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.role = reader.string(); + message.resource = reader.string(); break; case 2: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - case 3: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26437,145 +37586,123 @@ }; /** - * Decodes a Binding message from the specified reader or buffer, length delimited. + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Binding.decodeDelimited = function decodeDelimited(reader) { + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Binding message. + * Verifies a GetIamPolicyRequest message. * @function verify - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Binding.verify = function verify(message) { + GetIamPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); if (error) - return "condition." + error; + return "options." + error; } return null; }; /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @static - * @param {google.iam.v1.Binding} message Binding + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Binding.toObject = function toObject(message, options) { + GetIamPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.members = []; if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; + object.resource = ""; + object.options = null; } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); return object; }; /** - * Converts this Binding to JSON. + * Converts this GetIamPolicyRequest to JSON. * @function toJSON - * @memberof google.iam.v1.Binding + * @memberof google.iam.v1.GetIamPolicyRequest * @instance * @returns {Object.} JSON object */ - Binding.prototype.toJSON = function toJSON() { + GetIamPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Binding; + return GetIamPolicyRequest; })(); - v1.PolicyDelta = (function() { + v1.TestIamPermissionsRequest = (function() { /** - * Properties of a PolicyDelta. + * Properties of a TestIamPermissionsRequest. * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions */ /** - * Constructs a new PolicyDelta. + * Constructs a new TestIamPermissionsRequest. * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; + function TestIamPermissionsRequest(properties) { + this.permissions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26583,94 +37710,91 @@ } /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest * @instance */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + TestIamPermissionsRequest.prototype.resource = ""; /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest * @instance */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; /** - * Creates a new PolicyDelta instance using the specified properties. + * Creates a new TestIamPermissionsRequest instance using the specified properties. * @function create - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); }; /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. * @function encode - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PolicyDelta.encode = function encode(message, writer) { + TestIamPermissionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); return writer; }; /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PolicyDelta message from the specified reader or buffer. + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PolicyDelta.decode = function decode(reader, length) { + TestIamPermissionsRequest.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.iam.v1.PolicyDelta(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + message.resource = reader.string(); break; case 2: - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -26681,153 +37805,129 @@ }; /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PolicyDelta message. + * Verifies a TestIamPermissionsRequest message. * @function verify - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PolicyDelta.verify = function verify(message) { + TestIamPermissionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; } return null; }; /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); } return message; }; /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PolicyDelta.toObject = function toObject(message, options) { + TestIamPermissionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; } return object; }; /** - * Converts this PolicyDelta to JSON. + * Converts this TestIamPermissionsRequest to JSON. * @function toJSON - * @memberof google.iam.v1.PolicyDelta + * @memberof google.iam.v1.TestIamPermissionsRequest * @instance * @returns {Object.} JSON object */ - PolicyDelta.prototype.toJSON = function toJSON() { + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PolicyDelta; + return TestIamPermissionsRequest; })(); - v1.BindingDelta = (function() { + v1.TestIamPermissionsResponse = (function() { /** - * Properties of a BindingDelta. + * Properties of a TestIamPermissionsResponse. * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions */ /** - * Constructs a new BindingDelta. + * Constructs a new TestIamPermissionsResponse. * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set */ - function BindingDelta(properties) { + function TestIamPermissionsResponse(properties) { + this.permissions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26835,114 +37935,78 @@ } /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse * @instance */ - BindingDelta.prototype.condition = null; + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; /** - * Creates a new BindingDelta instance using the specified properties. + * Creates a new TestIamPermissionsResponse instance using the specified properties. * @function create - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); }; /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. * @function encode - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindingDelta.encode = function encode(message, writer) { + TestIamPermissionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); return writer; }; /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BindingDelta message from the specified reader or buffer. + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindingDelta.decode = function decode(reader, length) { + TestIamPermissionsResponse.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.iam.v1.BindingDelta(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.action = reader.int32(); - break; - case 2: - message.role = reader.string(); - break; - case 3: - message.member = reader.string(); - break; - case 4: - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -26953,174 +38017,119 @@ }; /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BindingDelta message. + * Verifies a TestIamPermissionsResponse message. * @function verify - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BindingDelta.verify = function verify(message) { + TestIamPermissionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; } return null; }; /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); } return message; }; /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BindingDelta.toObject = function toObject(message, options) { + TestIamPermissionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); return object; }; /** - * Converts this BindingDelta to JSON. + * Converts this TestIamPermissionsResponse to JSON. * @function toJSON - * @memberof google.iam.v1.BindingDelta + * @memberof google.iam.v1.TestIamPermissionsResponse * @instance * @returns {Object.} JSON object */ - BindingDelta.prototype.toJSON = function toJSON() { + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; + return TestIamPermissionsResponse; })(); - v1.AuditConfigDelta = (function() { + v1.GetPolicyOptions = (function() { /** - * Properties of an AuditConfigDelta. + * Properties of a GetPolicyOptions. * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion */ /** - * Constructs a new AuditConfigDelta. + * Constructs a new GetPolicyOptions. * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set */ - function AuditConfigDelta(properties) { + function GetPolicyOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27128,114 +38137,75 @@ } /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions * @instance */ - AuditConfigDelta.prototype.logType = ""; + GetPolicyOptions.prototype.requestedPolicyVersion = 0; /** - * Creates a new AuditConfigDelta instance using the specified properties. + * Creates a new GetPolicyOptions instance using the specified properties. * @function create - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); }; /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. * @function encode - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuditConfigDelta.encode = function encode(message, writer) { + GetPolicyOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); return writer; }; /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. + * Decodes a GetPolicyOptions message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuditConfigDelta.decode = function decode(reader, length) { + GetPolicyOptions.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.iam.v1.AuditConfigDelta(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.action = reader.int32(); - break; - case 2: - message.service = reader.string(); - break; - case 3: - message.exemptedMember = reader.string(); - break; - case 4: - message.logType = reader.string(); + message.requestedPolicyVersion = reader.int32(); break; default: reader.skipType(tag & 7); @@ -27246,301 +38216,110 @@ }; /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AuditConfigDelta message. + * Verifies a GetPolicyOptions message. * @function verify - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AuditConfigDelta.verify = function verify(message) { + GetPolicyOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; return null; }; /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; return message; }; /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuditConfigDelta.toObject = function toObject(message, options) { + GetPolicyOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; return object; }; /** - * Converts this AuditConfigDelta to JSON. + * Converts this GetPolicyOptions to JSON. * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta + * @memberof google.iam.v1.GetPolicyOptions * @instance * @returns {Object.} JSON object */ - AuditConfigDelta.prototype.toJSON = function toJSON() { + GetPolicyOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; + return GetPolicyOptions; })(); - v1.SetIamPolicyRequest = (function() { + v1.Policy = (function() { /** - * Properties of a SetIamPolicyRequest. + * Properties of a Policy. * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Uint8Array|null} [etag] Policy etag */ /** - * Constructs a new SetIamPolicyRequest. + * Constructs a new Policy. * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest + * @classdesc Represents a Policy. + * @implements IPolicy * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @param {google.iam.v1.IPolicy=} [properties] Properties to set */ - function SetIamPolicyRequest(properties) { + function Policy(properties) { + this.bindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27548,88 +38327,104 @@ } /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy * @instance */ - SetIamPolicyRequest.prototype.resource = ""; + Policy.prototype.version = 0; /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy * @instance */ - SetIamPolicyRequest.prototype.policy = null; + Policy.prototype.bindings = $util.emptyArray; /** - * Creates a new SetIamPolicyRequest instance using the specified properties. + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. * @function create - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); + Policy.create = function create(properties) { + return new Policy(properties); }; /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetIamPolicyRequest.encode = function encode(message, writer) { + Policy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + Policy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * Decodes a Policy message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @returns {google.iam.v1.Policy} Policy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetIamPolicyRequest.decode = function decode(reader, length) { + Policy.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.iam.v1.SetIamPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resource = reader.string(); + message.version = reader.int32(); break; - case 2: - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + case 4: + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + case 3: + message.etag = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -27640,122 +38435,154 @@ }; /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a Policy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @returns {google.iam.v1.Policy} Policy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + Policy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetIamPolicyRequest message. + * Verifies a Policy message. * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetIamPolicyRequest.verify = function verify(message) { + Policy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; return null; }; /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Policy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @returns {google.iam.v1.Policy} Policy */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length) + message.etag = object.etag; return message; }; /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a Policy message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {google.iam.v1.Policy} message Policy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetIamPolicyRequest.toObject = function toObject(message, options) { + Policy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.bindings = []; if (options.defaults) { - object.resource = ""; - object.policy = null; + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); return object; }; /** - * Converts this SetIamPolicyRequest to JSON. + * Converts this Policy to JSON. * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest + * @memberof google.iam.v1.Policy * @instance * @returns {Object.} JSON object */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { + Policy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SetIamPolicyRequest; + return Policy; })(); - v1.GetIamPolicyRequest = (function() { + v1.Binding = (function() { /** - * Properties of a GetIamPolicyRequest. + * Properties of a Binding. * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition */ /** - * Constructs a new GetIamPolicyRequest. + * Constructs a new Binding. * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest + * @classdesc Represents a Binding. + * @implements IBinding * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @param {google.iam.v1.IBinding=} [properties] Properties to set */ - function GetIamPolicyRequest(properties) { + function Binding(properties) { + this.members = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27763,88 +38590,104 @@ } /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding * @instance */ - GetIamPolicyRequest.prototype.resource = ""; + Binding.prototype.role = ""; /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding * @instance */ - GetIamPolicyRequest.prototype.options = null; + Binding.prototype.members = $util.emptyArray; /** - * Creates a new GetIamPolicyRequest instance using the specified properties. + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. * @function create - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); + Binding.create = function create(properties) { + return new Binding(properties); }; /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIamPolicyRequest.encode = function encode(message, writer) { + Binding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + Binding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * Decodes a Binding message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @returns {google.iam.v1.Binding} Binding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIamPolicyRequest.decode = function decode(reader, length) { + Binding.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.iam.v1.GetIamPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resource = reader.string(); + message.role = reader.string(); break; case 2: - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + case 3: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -27855,123 +38698,145 @@ }; /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a Binding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @returns {google.iam.v1.Binding} Binding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + Binding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetIamPolicyRequest message. + * Verifies a Binding message. * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetIamPolicyRequest.verify = function verify(message) { + Binding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); if (error) - return "options." + error; + return "condition." + error; } return null; }; /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Binding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @returns {google.iam.v1.Binding} Binding */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); } return message; }; /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a Binding message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {google.iam.v1.Binding} message Binding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetIamPolicyRequest.toObject = function toObject(message, options) { + Binding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.members = []; if (options.defaults) { - object.resource = ""; - object.options = null; + object.role = ""; + object.condition = null; } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); return object; }; /** - * Converts this GetIamPolicyRequest to JSON. + * Converts this Binding to JSON. * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest + * @memberof google.iam.v1.Binding * @instance * @returns {Object.} JSON object */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { + Binding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetIamPolicyRequest; + return Binding; })(); - v1.TestIamPermissionsRequest = (function() { + v1.PolicyDelta = (function() { /** - * Properties of a TestIamPermissionsRequest. + * Properties of a PolicyDelta. * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas */ /** - * Constructs a new TestIamPermissionsRequest. + * Constructs a new PolicyDelta. * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27979,91 +38844,94 @@ } /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta * @instance */ - TestIamPermissionsRequest.prototype.resource = ""; + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta * @instance */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. + * Creates a new PolicyDelta instance using the specified properties. * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); }; /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsRequest.encode = function encode(message, writer) { + PolicyDelta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * Decodes a PolicyDelta message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @returns {google.iam.v1.PolicyDelta} PolicyDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestIamPermissionsRequest.decode = function decode(reader, length) { + PolicyDelta.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.iam.v1.TestIamPermissionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resource = reader.string(); + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); break; case 2: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -28074,129 +38942,153 @@ }; /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @returns {google.iam.v1.PolicyDelta} PolicyDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestIamPermissionsRequest message. + * Verifies a PolicyDelta message. * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestIamPermissionsRequest.verify = function verify(message) { + PolicyDelta.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } } return null; }; /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @returns {google.iam.v1.PolicyDelta} PolicyDelta */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } } return message; }; /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {google.iam.v1.PolicyDelta} message PolicyDelta * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { + PolicyDelta.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); } return object; }; /** - * Converts this TestIamPermissionsRequest to JSON. + * Converts this PolicyDelta to JSON. * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest + * @memberof google.iam.v1.PolicyDelta * @instance * @returns {Object.} JSON object */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + PolicyDelta.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TestIamPermissionsRequest; + return PolicyDelta; })(); - v1.TestIamPermissionsResponse = (function() { + v1.BindingDelta = (function() { /** - * Properties of a TestIamPermissionsResponse. + * Properties of a BindingDelta. * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition */ /** - * Constructs a new TestIamPermissionsResponse. + * Constructs a new BindingDelta. * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; + function BindingDelta(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28204,78 +39096,114 @@ } /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta * @instance */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + BindingDelta.prototype.action = 0; /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); }; /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsResponse.encode = function encode(message, writer) { + BindingDelta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * Decodes a BindingDelta message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @returns {google.iam.v1.BindingDelta} BindingDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestIamPermissionsResponse.decode = function decode(reader, length) { + BindingDelta.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.iam.v1.TestIamPermissionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); + message.action = reader.int32(); + break; + case 2: + message.role = reader.string(); + break; + case 3: + message.member = reader.string(); + break; + case 4: + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -28286,119 +39214,174 @@ }; /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @returns {google.iam.v1.BindingDelta} BindingDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + BindingDelta.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestIamPermissionsResponse message. + * Verifies a BindingDelta message. * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TestIamPermissionsResponse.verify = function verify(message) { + BindingDelta.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; } return null; }; /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @returns {google.iam.v1.BindingDelta} BindingDelta */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); } return message; }; /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {google.iam.v1.BindingDelta} message BindingDelta * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { + BindingDelta.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); return object; }; /** - * Converts this TestIamPermissionsResponse to JSON. + * Converts this BindingDelta to JSON. * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse + * @memberof google.iam.v1.BindingDelta * @instance * @returns {Object.} JSON object */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + BindingDelta.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TestIamPermissionsResponse; + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; })(); - v1.GetPolicyOptions = (function() { + v1.AuditConfigDelta = (function() { /** - * Properties of a GetPolicyOptions. + * Properties of an AuditConfigDelta. * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType */ /** - * Constructs a new GetPolicyOptions. + * Constructs a new AuditConfigDelta. * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set */ - function GetPolicyOptions(properties) { + function AuditConfigDelta(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28406,75 +39389,114 @@ } /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta * @instance */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; + AuditConfigDelta.prototype.action = 0; /** - * Creates a new GetPolicyOptions instance using the specified properties. + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. * @function create - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); }; /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. * @function encode - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPolicyOptions.encode = function encode(message, writer) { + AuditConfigDelta.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); return writer; }; /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. + * Decodes an AuditConfigDelta message from the specified reader or buffer. * @function decode - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPolicyOptions.decode = function decode(reader, length) { + AuditConfigDelta.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.iam.v1.GetPolicyOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.requestedPolicyVersion = reader.int32(); + message.action = reader.int32(); + break; + case 2: + message.service = reader.string(); + break; + case 3: + message.exemptedMember = reader.string(); + break; + case 4: + message.logType = reader.string(); break; default: reader.skipType(tag & 7); @@ -28485,87 +39507,146 @@ }; /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPolicyOptions message. + * Verifies an AuditConfigDelta message. * @function verify - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPolicyOptions.verify = function verify(message) { + AuditConfigDelta.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; return null; }; /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); return message; }; /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. * @function toObject - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPolicyOptions.toObject = function toObject(message, options) { + AuditConfigDelta.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; return object; }; /** - * Converts this GetPolicyOptions to JSON. + * Converts this AuditConfigDelta to JSON. * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions + * @memberof google.iam.v1.AuditConfigDelta * @instance * @returns {Object.} JSON object */ - GetPolicyOptions.prototype.toJSON = function toJSON() { + AuditConfigDelta.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPolicyOptions; + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; })(); return v1; @@ -30841,272 +41922,6 @@ return longrunning; })(); - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - 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 code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.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.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.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.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.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.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - 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.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.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.rpc.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.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.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.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Status; - })(); - - return rpc; - })(); - return google; })(); diff --git a/packages/google-devtools-artifactregistry/protos/protos.json b/packages/google-devtools-artifactregistry/protos/protos.json index a50ddf37abe..e6c0c316ff6 100644 --- a/packages/google-devtools-artifactregistry/protos/protos.json +++ b/packages/google-devtools-artifactregistry/protos/protos.json @@ -11,12 +11,139 @@ "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1", "go_package": "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry", "java_multiple_files": true, - "java_outer_classname": "ServiceProto", + "java_outer_classname": "YumArtifactProto", "java_package": "com.google.devtools.artifactregistry.v1", "php_namespace": "Google\\Cloud\\ArtifactRegistry\\V1", "ruby_package": "Google::Cloud::ArtifactRegistry::V1" }, "nested": { + "AptArtifact": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/AptArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageType": { + "type": "PackageType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "architecture": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "component": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "controlFile": { + "type": "bytes", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PackageType": { + "values": { + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2 + } + } + } + }, + "ImportAptArtifactsGcsSource": { + "fields": { + "uris": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "useWildcards": { + "type": "bool", + "id": 2 + } + } + }, + "ImportAptArtifactsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportAptArtifactsGcsSource", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1 + } + } + }, + "ImportAptArtifactsErrorInfo": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportAptArtifactsGcsSource", + "id": 1 + }, + "error": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "ImportAptArtifactsResponse": { + "fields": { + "aptArtifacts": { + "rule": "repeated", + "type": "AptArtifact", + "id": 1 + }, + "errors": { + "rule": "repeated", + "type": "ImportAptArtifactsErrorInfo", + "id": 2 + } + } + }, + "ImportAptArtifactsMetadata": { + "fields": {} + }, "DockerImage": { "options": { "(google.api.resource).type": "artifactregistry.googleapis.com/DockerImage", @@ -79,175 +206,1280 @@ } } }, - "ListDockerImagesResponse": { + "ListDockerImagesResponse": { + "fields": { + "dockerImages": { + "rule": "repeated", + "type": "DockerImage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDockerImageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/DockerImage" + } + } + } + }, + "Hash": { + "fields": { + "type": { + "type": "HashType", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + }, + "nested": { + "HashType": { + "values": { + "HASH_TYPE_UNSPECIFIED": 0, + "SHA256": 1, + "MD5": 2 + } + } + } + }, + "File": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/File", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "sizeBytes": { + "type": "int64", + "id": 3 + }, + "hashes": { + "rule": "repeated", + "type": "Hash", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "owner": { + "type": "string", + "id": 7 + } + } + }, + "ListFilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListFilesResponse": { + "fields": { + "files": { + "rule": "repeated", + "type": "File", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetFileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "Package": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "ListPackagesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListPackagesResponse": { + "fields": { + "packages": { + "rule": "repeated", + "type": "Package", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePackageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Repository": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + }, + "oneofs": { + "formatConfig": { + "oneof": [ + "mavenConfig" + ] + } + }, + "fields": { + "mavenConfig": { + "type": "MavenRepositoryConfig", + "id": 9 + }, + "name": { + "type": "string", + "id": 1 + }, + "format": { + "type": "Format", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "kmsKeyName": { + "type": "string", + "id": 8 + } + }, + "nested": { + "MavenRepositoryConfig": { + "fields": { + "allowSnapshotOverwrites": { + "type": "bool", + "id": 1 + }, + "versionPolicy": { + "type": "VersionPolicy", + "id": 2 + } + }, + "nested": { + "VersionPolicy": { + "values": { + "VERSION_POLICY_UNSPECIFIED": 0, + "RELEASE": 1, + "SNAPSHOT": 2 + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "DOCKER": 1, + "MAVEN": 2, + "NPM": 3, + "APT": 5, + "YUM": 6, + "PYTHON": 8 + } + } + } + }, + "ListRepositoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListRepositoriesResponse": { + "fields": { + "repositories": { + "rule": "repeated", + "type": "Repository", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "CreateRepositoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } + }, + "repositoryId": { + "type": "string", + "id": 2 + }, + "repository": { + "type": "Repository", + "id": 3 + } + } + }, + "UpdateRepositoryRequest": { + "fields": { + "repository": { + "type": "Repository", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteRepositoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } + } + } + }, + "ArtifactRegistry": { + "options": { + "(google.api.default_host)": "artifactregistry.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "ListDockerImages": { + "requestType": "ListDockerImagesRequest", + "responseType": "ListDockerImagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDockerImage": { + "requestType": "GetDockerImageRequest", + "responseType": "DockerImage", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/dockerImages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ImportAptArtifacts": { + "requestType": "ImportAptArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata" + } + } + ] + }, + "ImportYumArtifacts": { + "requestType": "ImportYumArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata" + } + } + ] + }, + "ListRepositories": { + "requestType": "ListRepositoriesRequest", + "responseType": "ListRepositoriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/repositories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/repositories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetRepository": { + "requestType": "GetRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateRepository": { + "requestType": "CreateRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/repositories", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "parent,repository,repository_id", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1.Repository", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/repositories", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "parent,repository,repository_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1.Repository", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "UpdateRepository": { + "requestType": "UpdateRepositoryRequest", + "responseType": "Repository", + "options": { + "(google.api.http).patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", + "(google.api.http).body": "repository", + "(google.api.method_signature)": "repository,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{repository.name=projects/*/locations/*/repositories/*}", + "body": "repository" + } + }, + { + "(google.api.method_signature)": "repository,update_mask" + } + ] + }, + "DeleteRepository": { + "requestType": "DeleteRepositoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ListPackages": { + "requestType": "ListPackagesRequest", + "responseType": "ListPackagesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/packages" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetPackage": { + "requestType": "GetPackageRequest", + "responseType": "Package", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeletePackage": { + "requestType": "DeletePackageRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ListVersions": { + "requestType": "ListVersionsRequest", + "responseType": "ListVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/versions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVersion": { + "requestType": "GetVersionRequest", + "responseType": "Version", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteVersion": { + "requestType": "DeleteVersionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.devtools.artifactregistry.v1.OperationMetadata" + } + } + ] + }, + "ListFiles": { + "requestType": "ListFilesRequest", + "responseType": "ListFilesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/files", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*}/files" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFile": { + "requestType": "GetFileRequest", + "responseType": "File", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/files/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListTags": { + "requestType": "ListTagsRequest", + "responseType": "ListTagsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTag": { + "requestType": "GetTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateTag": { + "requestType": "CreateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "parent,tag,tag_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/repositories/*/packages/*}/tags", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "parent,tag,tag_id" + } + ] + }, + "UpdateTag": { + "requestType": "UpdateTagRequest", + "responseType": "Tag", + "options": { + "(google.api.http).patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.http).body": "tag", + "(google.api.method_signature)": "tag,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "body": "tag" + } + }, + { + "(google.api.method_signature)": "tag,update_mask" + } + ] + }, + "DeleteTag": { + "requestType": "DeleteTagRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions", + "body": "*" + } + } + ] + }, + "GetProjectSettings": { + "requestType": "GetProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/projectSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/projectSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateProjectSettings": { + "requestType": "UpdateProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).patch": "/v1/{project_settings.name=projects/*/projectSettings}", + "(google.api.http).body": "project_settings", + "(google.api.method_signature)": "project_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{project_settings.name=projects/*/projectSettings}", + "body": "project_settings" + } + }, + { + "(google.api.method_signature)": "project_settings,update_mask" + } + ] + } + } + }, + "OperationMetadata": { + "fields": {} + }, + "ProjectSettings": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/ProjectSettings", + "(google.api.resource).pattern": "projects/{project}/projectSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "legacyRedirectionState": { + "type": "RedirectionState", + "id": 2 + } + }, + "nested": { + "RedirectionState": { + "values": { + "REDIRECTION_STATE_UNSPECIFIED": 0, + "REDIRECTION_FROM_GCR_IO_DISABLED": 1, + "REDIRECTION_FROM_GCR_IO_ENABLED": 2, + "REDIRECTION_FROM_GCR_IO_FINALIZED": 3 + } + } + } + }, + "GetProjectSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/ProjectSettings" + } + } + } + }, + "UpdateProjectSettingsRequest": { + "fields": { + "projectSettings": { + "type": "ProjectSettings", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "Tag": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Tag", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + }, + "ListTagsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListTagsResponse": { + "fields": { + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateTagRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "tagId": { + "type": "string", + "id": 2 + }, + "tag": { + "type": "Tag", + "id": 3 + } + } + }, + "UpdateTagRequest": { + "fields": { + "tag": { + "type": "Tag", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "VersionView": { + "values": { + "VERSION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + }, + "Version": { + "options": { + "(google.api.resource).type": "artifactregistry.googleapis.com/Version", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "relatedTags": { + "rule": "repeated", + "type": "Tag", + "id": 7 + }, + "metadata": { + "type": "google.protobuf.Struct", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "view": { + "type": "VersionView", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListVersionsResponse": { + "fields": { + "versions": { + "rule": "repeated", + "type": "Version", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "view": { + "type": "VersionView", + "id": 2 + } + } + }, + "DeleteVersionRequest": { "fields": { - "dockerImages": { - "rule": "repeated", - "type": "DockerImage", + "name": { + "type": "string", "id": 1 }, - "nextPageToken": { - "type": "string", + "force": { + "type": "bool", "id": 2 } } }, - "Repository": { + "YumArtifact": { "options": { - "(google.api.resource).type": "artifactregistry.googleapis.com/Repository", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}" + "(google.api.resource).type": "artifactregistry.googleapis.com/YumArtifact", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}" }, "fields": { "name": { "type": "string", - "id": 1 - }, - "format": { - "type": "Format", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "labels": { - "keyType": "string", + "packageName": { "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 + "packageType": { + "type": "PackageType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "kmsKeyName": { + "architecture": { "type": "string", - "id": 8 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "Format": { + "PackageType": { "values": { - "FORMAT_UNSPECIFIED": 0, - "DOCKER": 1, - "MAVEN": 2, - "NPM": 3, - "APT": 5, - "YUM": 6, - "PYTHON": 8 + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2 } } } }, - "ListRepositoriesRequest": { + "ImportYumArtifactsGcsSource": { "fields": { - "parent": { + "uris": { + "rule": "repeated", "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" - } + "id": 1 }, - "pageSize": { - "type": "int32", + "useWildcards": { + "type": "bool", "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 } } }, - "ListRepositoriesResponse": { + "ImportYumArtifactsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, "fields": { - "repositories": { - "rule": "repeated", - "type": "Repository", - "id": 1 + "gcsSource": { + "type": "ImportYumArtifactsGcsSource", + "id": 2 }, - "nextPageToken": { + "parent": { "type": "string", - "id": 2 + "id": 1 } } }, - "GetRepositoryRequest": { + "ImportYumArtifactsErrorInfo": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" - } + "gcsSource": { + "type": "ImportYumArtifactsGcsSource", + "id": 1 + }, + "error": { + "type": "google.rpc.Status", + "id": 2 } } }, - "ArtifactRegistry": { - "options": { - "(google.api.default_host)": "artifactregistry.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" - }, - "methods": { - "ListDockerImages": { - "requestType": "ListDockerImagesRequest", - "responseType": "ListDockerImagesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/repositories/*}/dockerImages" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ListRepositories": { - "requestType": "ListRepositoriesRequest", - "responseType": "ListRepositoriesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/repositories", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/repositories" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "ImportYumArtifactsResponse": { + "fields": { + "yumArtifacts": { + "rule": "repeated", + "type": "YumArtifact", + "id": 1 }, - "GetRepository": { - "requestType": "GetRepositoryRequest", - "responseType": "Repository", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/repositories/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/repositories/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "errors": { + "rule": "repeated", + "type": "ImportYumArtifactsErrorInfo", + "id": 2 } } + }, + "ImportYumArtifactsMetadata": { + "fields": {} } } }, @@ -2713,18 +3945,6 @@ } } }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Any": { "fields": { "type_url": { @@ -2737,7 +3957,7 @@ } } }, - "Duration": { + "Timestamp": { "fields": { "seconds": { "type": "int64", @@ -2749,9 +3969,6 @@ } } }, - "Empty": { - "fields": {} - }, "FieldMask": { "fields": { "paths": { @@ -2817,10 +4034,54 @@ }, "ListValue": { "fields": { - "values": { - "rule": "repeated", - "type": "Value", + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 } } } @@ -2834,117 +4095,11 @@ "csharp_namespace": "Google.Cloud.Iam.V1", "go_package": "google.golang.org/genproto/googleapis/iam/v1;iam", "java_multiple_files": true, - "java_outer_classname": "OptionsProto", + "java_outer_classname": "PolicyProto", "java_package": "com.google.iam.v1", "php_namespace": "Google\\Cloud\\Iam\\V1" }, "nested": { - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, "IAMPolicy": { "options": { "(google.api.default_host)": "iam-meta-api.googleapis.com" @@ -3071,6 +4226,112 @@ "id": 1 } } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } } } } @@ -3322,35 +4583,6 @@ } } } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } } } } diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js new file mode 100644 index 00000000000..6bd246765e5 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_repository.js @@ -0,0 +1,67 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource where the repository will be created. + */ + // const parent = 'abc123' + /** + * The repository id to use for this repository. + */ + // const repositoryId = 'abc123' + /** + * The repository to be created. + */ + // const repository = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateRepository() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await artifactregistryClient.createRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js new file mode 100644 index 00000000000..4e7a3b02f4e --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.create_tag.js @@ -0,0 +1,65 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource where the tag will be created. + */ + // const parent = 'abc123' + /** + * The tag id to use for this repository. + */ + // const tagId = 'abc123' + /** + * The tag to be created. + */ + // const tag = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callCreateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.createTag(request); + console.log(response); + } + + callCreateTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js new file mode 100644 index 00000000000..35c121251ef --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_package.js @@ -0,0 +1,59 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the package to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeletePackage() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deletePackage(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js new file mode 100644 index 00000000000..e53dd5f4afa --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_repository.js @@ -0,0 +1,59 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the repository to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteRepository() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await artifactregistryClient.deleteRepository(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js new file mode 100644 index 00000000000..b7812ca99a1 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_tag.js @@ -0,0 +1,57 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to delete. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.deleteTag(request); + console.log(response); + } + + callDeleteTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js new file mode 100644 index 00000000000..111aa6c3f64 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.delete_version.js @@ -0,0 +1,63 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to delete. + */ + // const name = 'abc123' + /** + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + */ + // const force = true + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callDeleteVersion() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.deleteVersion(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVersion(); + // [END artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js new file mode 100644 index 00000000000..3ae6a346de2 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_docker_image.js @@ -0,0 +1,58 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the docker images. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetDockerImage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getDockerImage(request); + console.log(response); + } + + callGetDockerImage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js new file mode 100644 index 00000000000..60c2a1c0de8 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_file.js @@ -0,0 +1,57 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the file to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetFile() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getFile(request); + console.log(response); + } + + callGetFile(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetFile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js new file mode 100644 index 00000000000..8237c092238 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_iam_policy.js @@ -0,0 +1,64 @@ +// Copyright 2022 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(resource) { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + */ + // const options = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await artifactregistryClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js new file mode 100644 index 00000000000..3a38252504d --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_package.js @@ -0,0 +1,58 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the package to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetPackage() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getPackage(request); + console.log(response); + } + + callGetPackage(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js new file mode 100644 index 00000000000..20f73d07aeb --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_project_settings.js @@ -0,0 +1,58 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the projectSettings resource. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetProjectSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await artifactregistryClient.getProjectSettings(request); + console.log(response); + } + + callGetProjectSettings(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js new file mode 100644 index 00000000000..6b763186d38 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_tag.js @@ -0,0 +1,57 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the tag to retrieve. + */ + // const name = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getTag(request); + console.log(response); + } + + callGetTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js new file mode 100644 index 00000000000..355438d44d7 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.get_version.js @@ -0,0 +1,61 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the version to retrieve. + */ + // const name = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callGetVersion() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.getVersion(request); + console.log(response); + } + + callGetVersion(); + // [END artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js new file mode 100644 index 00000000000..6cb559551d0 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_apt_artifacts.js @@ -0,0 +1,62 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage location where input content is located. + */ + // const gcsSource = {} + /** + * The name of the parent resource where the artifacts will be imported. + */ + // const parent = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callImportAptArtifacts() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.importAptArtifacts(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportAptArtifacts(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js new file mode 100644 index 00000000000..6bf44d19331 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.import_yum_artifacts.js @@ -0,0 +1,62 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage location where input content is located. + */ + // const gcsSource = {} + /** + * The name of the parent resource where the artifacts will be imported. + */ + // const parent = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callImportYumArtifacts() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await artifactregistryClient.importYumArtifacts(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportYumArtifacts(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js new file mode 100644 index 00000000000..027e302fc9f --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_files.js @@ -0,0 +1,84 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `name` + * * `owner` + * An example of using a filter: + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + */ + // const filter = 'abc123' + /** + * The maximum number of files to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListFiles() { + // Construct request + const request = { + }; + + // Run request + const iterable = await artifactregistryClient.listFilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFiles(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js new file mode 100644 index 00000000000..c8b0290414b --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_packages.js @@ -0,0 +1,68 @@ +// Copyright 2022 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 artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent resource whose packages will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of packages to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListPackages() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await artifactregistryClient.listPackagesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPackages(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js index 64053e7eda7..da63139cb0b 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_repositories.js @@ -30,7 +30,7 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of repositories to return. + * The maximum number of repositories to return. Maximum page size is 1,000. */ // const pageSize = 1234 /** diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js new file mode 100644 index 00000000000..8e071553330 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_tags.js @@ -0,0 +1,76 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose tags will be listed. + */ + // const parent = 'abc123' + /** + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * * `version` + * An example of using a filter: + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + */ + // const filter = 'abc123' + /** + * The maximum number of tags to return. Maximum page size is 10,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListTags() { + // Construct request + const request = { + }; + + // Run request + const iterable = await artifactregistryClient.listTagsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTags(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListTags_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js new file mode 100644 index 00000000000..e5caced3d6f --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.list_versions.js @@ -0,0 +1,75 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the parent resource whose versions will be listed. + */ + // const parent = 'abc123' + /** + * The maximum number of versions to return. Maximum page size is 1,000. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous list request, if any. + */ + // const pageToken = 'abc123' + /** + * The view that should be returned in the response. + */ + // const view = {} + /** + * Optional. The field to order the results by. + */ + // const orderBy = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callListVersions() { + // Construct request + const request = { + }; + + // Run request + const iterable = await artifactregistryClient.listVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVersions(); + // [END artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js new file mode 100644 index 00000000000..a3a255d6680 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.set_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2022 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(resource, policy) { + // [START artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await artifactregistryClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js new file mode 100644 index 00000000000..f0ec1a0896d --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.test_iam_permissions.js @@ -0,0 +1,67 @@ +// Copyright 2022 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(resource, permissions) { + // [START artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = 'abc123' + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await artifactregistryClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js new file mode 100644 index 00000000000..22289205431 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_project_settings.js @@ -0,0 +1,61 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The project settings. + */ + // const projectSettings = {} + /** + * Field mask to support partial updates. + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateProjectSettings() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateProjectSettings(request); + console.log(response); + } + + callUpdateProjectSettings(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js new file mode 100644 index 00000000000..8a52d9ffdf2 --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_repository.js @@ -0,0 +1,63 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The repository that replaces the resource on the server. + */ + // const repository = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateRepository() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateRepository(request); + console.log(response); + } + + callUpdateRepository(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js new file mode 100644 index 00000000000..ea9599a92ed --- /dev/null +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/artifact_registry.update_tag.js @@ -0,0 +1,63 @@ +// Copyright 2022 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() { + // [START artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The tag that replaces the resource on the server. + */ + // const tag = {} + /** + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Artifactregistry library + const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry').v1; + + // Instantiates a client + const artifactregistryClient = new ArtifactRegistryClient(); + + async function callUpdateTag() { + // Construct request + const request = { + }; + + // Run request + const response = await artifactregistryClient.updateTag(request); + console.log(response); + } + + callUpdateTag(); + // [END artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json index 65a16a96971..075aca0e21c 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json @@ -59,6 +59,134 @@ } } }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async", + "title": "ArtifactRegistry getDockerImage Sample", + "origin": "API_DEFINITION", + "description": " Gets a docker image.", + "canonical": true, + "file": "artifact_registry.get_docker_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDockerImage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.DockerImage", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetDockerImage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetDockerImage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async", + "title": "ArtifactRegistry importAptArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", + "canonical": true, + "file": "artifact_registry.import_apt_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportAptArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportAptArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async", + "title": "ArtifactRegistry importYumArtifacts Sample", + "origin": "API_DEFINITION", + "description": " Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.", + "canonical": true, + "file": "artifact_registry.import_yum_artifacts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportYumArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportYumArtifacts", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, { "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async", "title": "ArtifactRegistry listRepositories Sample", @@ -146,6 +274,946 @@ } } } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async", + "title": "ArtifactRegistry createRepository Sample", + "origin": "API_DEFINITION", + "description": " Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.", + "canonical": true, + "file": "artifact_registry.create_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1.Repository" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async", + "title": "ArtifactRegistry updateRepository Sample", + "origin": "API_DEFINITION", + "description": " Updates a repository.", + "canonical": true, + "file": "artifact_registry.update_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1.Repository" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Repository", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async", + "title": "ArtifactRegistry deleteRepository Sample", + "origin": "API_DEFINITION", + "description": " Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.", + "canonical": true, + "file": "artifact_registry.delete_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async", + "title": "ArtifactRegistry listPackages Sample", + "origin": "API_DEFINITION", + "description": " Lists packages.", + "canonical": true, + "file": "artifact_registry.list_packages.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListPackagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListPackages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListPackages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async", + "title": "ArtifactRegistry getPackage Sample", + "origin": "API_DEFINITION", + "description": " Gets a package.", + "canonical": true, + "file": "artifact_registry.get_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Package", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetPackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async", + "title": "ArtifactRegistry deletePackage Sample", + "origin": "API_DEFINITION", + "description": " Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.", + "canonical": true, + "file": "artifact_registry.delete_package.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async", + "title": "ArtifactRegistry listVersions Sample", + "origin": "API_DEFINITION", + "description": " Lists versions.", + "canonical": true, + "file": "artifact_registry.list_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.devtools.artifactregistry.v1.VersionView" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListVersionsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListVersions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListVersions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async", + "title": "ArtifactRegistry getVersion Sample", + "origin": "API_DEFINITION", + "description": " Gets a version", + "canonical": true, + "file": "artifact_registry.get_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.devtools.artifactregistry.v1.VersionView" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Version", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async", + "title": "ArtifactRegistry deleteVersion Sample", + "origin": "API_DEFINITION", + "description": " Deletes a version and all of its content. The returned operation will complete once the version has been deleted.", + "canonical": true, + "file": "artifact_registry.delete_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteVersion", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async", + "title": "ArtifactRegistry listFiles Sample", + "origin": "API_DEFINITION", + "description": " Lists files.", + "canonical": true, + "file": "artifact_registry.list_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListFilesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListFiles", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetFile_async", + "title": "ArtifactRegistry getFile Sample", + "origin": "API_DEFINITION", + "description": " Gets a file.", + "canonical": true, + "file": "artifact_registry.get_file.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 49, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.File", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetFile", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetFile", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListTags_async", + "title": "ArtifactRegistry listTags Sample", + "origin": "API_DEFINITION", + "description": " Lists tags.", + "canonical": true, + "file": "artifact_registry.list_tags.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTags", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ListTagsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListTags", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListTags", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetTag_async", + "title": "ArtifactRegistry getTag Sample", + "origin": "API_DEFINITION", + "description": " Gets a tag.", + "canonical": true, + "file": "artifact_registry.get_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 49, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async", + "title": "ArtifactRegistry createTag Sample", + "origin": "API_DEFINITION", + "description": " Creates a tag.", + "canonical": true, + "file": "artifact_registry.create_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "tag_id", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1.Tag" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async", + "title": "ArtifactRegistry updateTag Sample", + "origin": "API_DEFINITION", + "description": " Updates a tag.", + "canonical": true, + "file": "artifact_registry.update_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "async": true, + "parameters": [ + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1.Tag" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async", + "title": "ArtifactRegistry deleteTag Sample", + "origin": "API_DEFINITION", + "description": " Deletes a tag.", + "canonical": true, + "file": "artifact_registry.delete_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 49, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteTag", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async", + "title": "ArtifactRegistry setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Updates the IAM policy for a given resource.", + "canonical": true, + "file": "artifact_registry.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async", + "title": "ArtifactRegistry getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the IAM policy for a given resource.", + "canonical": true, + "file": "artifact_registry.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async", + "title": "ArtifactRegistry testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Tests if the caller has a list of permissions on a resource.", + "canonical": true, + "file": "artifact_registry.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.TestIamPermissions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async", + "title": "ArtifactRegistry getProjectSettings Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the Settings for the Project.", + "canonical": true, + "file": "artifact_registry.get_project_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async", + "title": "ArtifactRegistry updateProjectSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the Settings for the Project.", + "canonical": true, + "file": "artifact_registry.update_project_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "async": true, + "parameters": [ + { + "name": "project_settings", + "type": ".google.devtools.artifactregistry.v1.ProjectSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateProjectSettings", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } } ] } diff --git a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts index 032b0e87cfb..4d0c7183c0f 100644 --- a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts +++ b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + LROperation, PaginationCallback, GaxCall, } from 'google-gax'; @@ -37,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './artifact_registry_client_config.json'; - +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -75,6 +76,7 @@ export class ArtifactRegistryClient { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; artifactRegistryStub?: Promise<{[name: string]: Function}>; /** @@ -176,12 +178,30 @@ export class ArtifactRegistryClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + aptArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}' + ), dockerImagePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}' ), + filePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/files/{file}' + ), + projectSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/projectSettings' + ), repositoryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/repositories/{repository}' ), + tagPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag}' + ), + versionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version}' + ), + yumArtifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/repositories/{repository}/yumArtifacts/{yum_artifact}' + ), }; // Some of the methods on this service return "paged" results, @@ -198,6 +218,108 @@ export class ArtifactRegistryClient { 'nextPageToken', 'repositories' ), + listPackages: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'packages' + ), + listVersions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'versions' + ), + listFiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'files' + ), + listTags: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tags' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const importAptArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse' + ) as gax.protobuf.Type; + const importAptArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata' + ) as gax.protobuf.Type; + const importYumArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse' + ) as gax.protobuf.Type; + const importYumArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata' + ) as gax.protobuf.Type; + const createRepositoryResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.Repository' + ) as gax.protobuf.Type; + const createRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteRepositoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteRepositoryMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deletePackageResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deletePackageMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteVersionResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteVersionMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + importAptArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importAptArtifactsResponse.decode.bind(importAptArtifactsResponse), + importAptArtifactsMetadata.decode.bind(importAptArtifactsMetadata) + ), + importYumArtifacts: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importYumArtifactsResponse.decode.bind(importYumArtifactsResponse), + importYumArtifactsMetadata.decode.bind(importYumArtifactsMetadata) + ), + createRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRepositoryResponse.decode.bind(createRepositoryResponse), + createRepositoryMetadata.decode.bind(createRepositoryMetadata) + ), + deleteRepository: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteRepositoryResponse.decode.bind(deleteRepositoryResponse), + deleteRepositoryMetadata.decode.bind(deleteRepositoryMetadata) + ), + deletePackage: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePackageResponse.decode.bind(deletePackageResponse), + deletePackageMetadata.decode.bind(deletePackageMetadata) + ), + deleteVersion: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVersionResponse.decode.bind(deleteVersionResponse), + deleteVersionMetadata.decode.bind(deleteVersionMetadata) + ), }; // Put together the default options sent with requests. @@ -252,8 +374,32 @@ export class ArtifactRegistryClient { // and create an API call method for each. const artifactRegistryStubMethods = [ 'listDockerImages', + 'getDockerImage', + 'importAptArtifacts', + 'importYumArtifacts', 'listRepositories', 'getRepository', + 'createRepository', + 'updateRepository', + 'deleteRepository', + 'listPackages', + 'getPackage', + 'deletePackage', + 'listVersions', + 'getVersion', + 'deleteVersion', + 'listFiles', + 'getFile', + 'listTags', + 'getTag', + 'createTag', + 'updateTag', + 'deleteTag', + 'setIamPolicy', + 'getIamPolicy', + 'testIamPermissions', + 'getProjectSettings', + 'updateProjectSettings', ]; for (const methodName of artifactRegistryStubMethods) { const callPromise = this.artifactRegistryStub.then( @@ -270,7 +416,10 @@ export class ArtifactRegistryClient { } ); - const descriptor = this.descriptors.page[methodName] || undefined; + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -339,6 +488,103 @@ export class ArtifactRegistryClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Gets a docker image. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the docker images. + * @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 [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage}. + * 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/artifact_registry.get_docker_image.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetDockerImage_async + */ + getDockerImage( + request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IDockerImage, + ( + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | undefined + ), + {} | undefined + ] + >; + getDockerImage( + request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDockerImage( + request: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDockerImage( + request?: protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IDockerImage, + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IDockerImage, + ( + | protos.google.devtools.artifactregistry.v1.IGetDockerImageRequest + | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getDockerImage(request, options, callback); + } /** * Gets a repository. * @@ -436,85 +682,87 @@ export class ArtifactRegistryClient { this.initialize(); return this.innerApiCalls.getRepository(request, options, callback); } - /** - * Lists docker images. + * Updates a repository. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose docker images will be listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.Repository} request.repository + * The repository that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask * @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 [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage}. - * 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 `listDockerImagesAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing [Repository]{@link google.devtools.artifactregistry.v1.Repository}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.update_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateRepository_async */ - listDockerImages( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + updateRepository( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, options?: CallOptions ): Promise< [ - protos.google.devtools.artifactregistry.v1.IDockerImage[], - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest | null, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + protos.google.devtools.artifactregistry.v1.IRepository, + ( + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest + | undefined + ), + {} | undefined ] >; - listDockerImages( - request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + updateRepository( + request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest | null | undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage + {} | null | undefined > ): void; - listDockerImages( - request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + updateRepository( + request: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest | null | undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage + {} | null | undefined > ): void; - listDockerImages( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + updateRepository( + request?: protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + | Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest | null | undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, - | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IRepository, + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest | null | undefined, - protos.google.devtools.artifactregistry.v1.IDockerImage + {} | null | undefined > ): Promise< [ - protos.google.devtools.artifactregistry.v1.IDockerImage[], - protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest | null, - protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + protos.google.devtools.artifactregistry.v1.IRepository, + ( + | protos.google.devtools.artifactregistry.v1.IUpdateRepositoryRequest + | undefined + ), + {} | undefined ] > | void { request = request || {}; @@ -530,85 +778,2715 @@ export class ArtifactRegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'repository.name': request.repository!.name || '', }); this.initialize(); - return this.innerApiCalls.listDockerImages(request, options, callback); + return this.innerApiCalls.updateRepository(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * Gets a package. + * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent resource whose docker images will be listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. + * @param {string} request.name + * Required. The name of the package to retrieve. * @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 [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage} 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 `listDockerImagesAsync()` - * method described below for async iteration which you can stop as needed. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Package]{@link google.devtools.artifactregistry.v1.Package}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.get_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetPackage_async */ - listDockerImagesStream( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + getPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, options?: CallOptions - ): Transform { + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest | undefined, + {} | undefined + ] + >; + getPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + | protos.google.devtools.artifactregistry.v1.IGetPackageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPackage( + request: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + | protos.google.devtools.artifactregistry.v1.IGetPackageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPackage( + request?: protos.google.devtools.artifactregistry.v1.IGetPackageRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + | protos.google.devtools.artifactregistry.v1.IGetPackageRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IPackage, + | protos.google.devtools.artifactregistry.v1.IGetPackageRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IPackage, + protos.google.devtools.artifactregistry.v1.IGetPackageRequest | 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'] = gax.routingHeader.fromParams({ - parent: request.parent || '', + name: request.name || '', }); - const defaultCallSettings = this._defaults['listDockerImages']; - const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDockerImages.createStream( - this.innerApiCalls.listDockerImages as gax.GaxCall, - request, - callSettings - ); + return this.innerApiCalls.getPackage(request, options, callback); } - /** - * Equivalent to `listDockerImages`, but returns an iterable object. + * Gets a version * - * `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 parent resource whose docker images will be listed. - * @param {number} request.pageSize - * The maximum number of artifacts to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. + * @param {string} request.name + * The name of the version to retrieve. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Version]{@link google.devtools.artifactregistry.v1.Version}. + * 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/artifact_registry.get_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetVersion_async + */ + getVersion( + request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest | undefined, + {} | undefined + ] + >; + getVersion( + request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + | protos.google.devtools.artifactregistry.v1.IGetVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVersion( + request: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + | protos.google.devtools.artifactregistry.v1.IGetVersionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVersion( + request?: protos.google.devtools.artifactregistry.v1.IGetVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + | protos.google.devtools.artifactregistry.v1.IGetVersionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IVersion, + | protos.google.devtools.artifactregistry.v1.IGetVersionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IVersion, + protos.google.devtools.artifactregistry.v1.IGetVersionRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getVersion(request, options, callback); + } + /** + * Gets a file. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the file to retrieve. + * @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 [File]{@link google.devtools.artifactregistry.v1.File}. + * 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/artifact_registry.get_file.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetFile_async + */ + getFile( + request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest | undefined, + {} | undefined + ] + >; + getFile( + request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + | protos.google.devtools.artifactregistry.v1.IGetFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFile( + request: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + | protos.google.devtools.artifactregistry.v1.IGetFileRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFile( + request?: protos.google.devtools.artifactregistry.v1.IGetFileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IFile, + | protos.google.devtools.artifactregistry.v1.IGetFileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IFile, + | protos.google.devtools.artifactregistry.v1.IGetFileRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IFile, + protos.google.devtools.artifactregistry.v1.IGetFileRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getFile(request, options, callback); + } + /** + * Gets a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to retrieve. + * @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 [Tag]{@link google.devtools.artifactregistry.v1.Tag}. + * 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/artifact_registry.get_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetTag_async + */ + getTag( + request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest | undefined, + {} | undefined + ] + >; + getTag( + request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IGetTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getTag( + request: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IGetTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getTag( + request?: protos.google.devtools.artifactregistry.v1.IGetTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IGetTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IGetTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IGetTagRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getTag(request, options, callback); + } + /** + * Creates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource where the tag will be created. + * @param {string} request.tagId + * The tag id to use for this repository. + * @param {google.devtools.artifactregistry.v1.Tag} request.tag + * The tag to be created. + * @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 [Tag]{@link google.devtools.artifactregistry.v1.Tag}. + * 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/artifact_registry.create_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateTag_async + */ + createTag( + request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest | undefined, + {} | undefined + ] + >; + createTag( + request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.ICreateTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createTag( + request: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.ICreateTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createTag( + request?: protos.google.devtools.artifactregistry.v1.ICreateTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.ICreateTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.ICreateTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.ICreateTagRequest | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createTag(request, options, callback); + } + /** + * Updates a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.Tag} request.tag + * The tag that replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * The update mask applies to the resource. For the `FieldMask` definition, + * see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @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 [Tag]{@link google.devtools.artifactregistry.v1.Tag}. + * 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/artifact_registry.update_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateTag_async + */ + updateTag( + request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest | undefined, + {} | undefined + ] + >; + updateTag( + request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IUpdateTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateTag( + request: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IUpdateTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateTag( + request?: protos.google.devtools.artifactregistry.v1.IUpdateTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IUpdateTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.ITag, + | protos.google.devtools.artifactregistry.v1.IUpdateTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag, + protos.google.devtools.artifactregistry.v1.IUpdateTagRequest | 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'] = + gax.routingHeader.fromParams({ + 'tag.name': request.tag!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateTag(request, options, callback); + } + /** + * Deletes a tag. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the tag to delete. + * @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 [Empty]{@link google.protobuf.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/artifact_registry.delete_tag.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteTag_async + */ + deleteTag( + request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest | undefined, + {} | undefined + ] + >; + deleteTag( + request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.artifactregistry.v1.IDeleteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteTag( + request: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.artifactregistry.v1.IDeleteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteTag( + request?: protos.google.devtools.artifactregistry.v1.IDeleteTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.artifactregistry.v1.IDeleteTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.artifactregistry.v1.IDeleteTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IDeleteTagRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteTag(request, options, callback); + } + /** + * Updates the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @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 [Policy]{@link google.iam.v1.Policy}. + * 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/artifact_registry.set_iam_policy.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | 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'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); + this.initialize(); + return this.innerApiCalls.setIamPolicy(request, options, callback); + } + /** + * Gets the IAM policy for a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * @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 [Policy]{@link google.iam.v1.Policy}. + * 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/artifact_registry.get_iam_policy.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | undefined, + {} | undefined + ] + >; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest | 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'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); + this.initialize(); + return this.innerApiCalls.getIamPolicy(request, options, callback); + } + /** + * Tests if the caller has a list of permissions on a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * 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/artifact_registry.test_iam_permissions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | 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'] = + gax.routingHeader.fromParams({ + resource: request.resource || '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } + /** + * Retrieves the Settings for the Project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the projectSettings resource. + * @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 [ProjectSettings]{@link google.devtools.artifactregistry.v1.ProjectSettings}. + * 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/artifact_registry.get_project_settings.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_GetProjectSettings_async + */ + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1.IGetProjectSettingsRequest + | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getProjectSettings(request, options, callback); + } + /** + * Updates the Settings for the Project. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ProjectSettings} request.projectSettings + * The project settings. + * @param {google.protobuf.FieldMask} request.updateMask + * Field mask to support partial updates. + * @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 [ProjectSettings]{@link google.devtools.artifactregistry.v1.ProjectSettings}. + * 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/artifact_registry.update_project_settings.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_UpdateProjectSettings_async + */ + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1.IProjectSettings, + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1.IUpdateProjectSettingsRequest + | 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'] = + gax.routingHeader.fromParams({ + 'project_settings.name': request.projectSettings!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateProjectSettings(request, options, callback); + } + + /** + * Imports Apt artifacts. The returned Operation will complete once the + * resources are imported. Package, Version, and File resources are created + * based on the imported artifacts. Imported artifacts that conflict with + * existing resources are ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ImportAptArtifactsGcsSource} request.gcsSource + * Google Cloud Storage location where input content is located. + * @param {string} request.parent + * The name of the parent resource where the artifacts will be imported. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportAptArtifactsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.importAptArtifacts(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importAptArtifacts()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + async checkImportAptArtifactsProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.importAptArtifacts, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.artifactregistry.v1.ImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata + >; + } + /** + * Imports Yum (RPM) artifacts. The returned Operation will complete once the + * resources are imported. Package, Version, and File resources are created + * based on the imported artifacts. Imported artifacts that conflict with + * existing resources are ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.artifactregistry.v1.ImportYumArtifactsGcsSource} request.gcsSource + * Google Cloud Storage location where input content is located. + * @param {string} request.parent + * The name of the parent resource where the artifacts will be imported. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1.IImportYumArtifactsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.importYumArtifacts(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importYumArtifacts()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + async checkImportYumArtifactsProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.importYumArtifacts, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.artifactregistry.v1.ImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata + >; + } + /** + * Creates a repository. The returned Operation will finish once the + * repository has been created. Its response will be the created Repository. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource where the repository will be created. + * @param {string} request.repositoryId + * The repository id to use for this repository. + * @param {google.devtools.artifactregistry.v1.Repository} request.repository + * The repository to be created. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async + */ + createRepository( + request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createRepository( + request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRepository( + request: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRepository( + request?: protos.google.devtools.artifactregistry.v1.ICreateRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createRepository(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.create_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async + */ + async checkCreateRepositoryProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.artifactregistry.v1.Repository, + protos.google.devtools.artifactregistry.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createRepository, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.artifactregistry.v1.Repository, + protos.google.devtools.artifactregistry.v1.OperationMetadata + >; + } + /** + * Deletes a repository and all of its contents. The returned Operation will + * finish once the repository has been deleted. It will not have any Operation + * metadata and will return a google.protobuf.Empty response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the repository to delete. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async + */ + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteRepository( + request?: protos.google.devtools.artifactregistry.v1.IDeleteRepositoryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteRepository(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteRepository()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_repository.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteRepository_async + */ + async checkDeleteRepositoryProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteRepository, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + >; + } + /** + * Deletes a package and all of its versions and tags. The returned operation + * will complete once the package has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the package to delete. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async + */ + deletePackage( + request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deletePackage( + request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePackage( + request: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePackage( + request?: protos.google.devtools.artifactregistry.v1.IDeletePackageRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deletePackage(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deletePackage()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_package.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeletePackage_async + */ + async checkDeletePackageProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deletePackage, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + >; + } + /** + * Deletes a version and all of its content. The returned operation will + * complete once the version has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the version to delete. + * @param {boolean} request.force + * By default, a version that is tagged may not be deleted. If force=true, the + * version and any tags pointing to the version are deleted. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async + */ + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteVersion( + request: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteVersion( + request?: protos.google.devtools.artifactregistry.v1.IDeleteVersionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteVersion(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteVersion()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/artifact_registry.delete_version.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_DeleteVersion_async + */ + async checkDeleteVersionProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteVersion, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.devtools.artifactregistry.v1.OperationMetadata + >; + } + /** + * Lists docker images. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose docker images will be listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage}. + * 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 `listDockerImagesAsync()` + * 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. + */ + listDockerImages( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IDockerImage[], + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest | null, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + ] + >; + listDockerImages( + request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage + > + ): void; + listDockerImages( + request: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage + > + ): void; + listDockerImages( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage + >, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + | protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IDockerImage + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IDockerImage[], + protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest | null, + protos.google.devtools.artifactregistry.v1.IListDockerImagesResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listDockerImages(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 parent resource whose docker images will be listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage} 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 `listDockerImagesAsync()` + * 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. + */ + listDockerImagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listDockerImages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDockerImages.createStream( + this.innerApiCalls.listDockerImages as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDockerImages`, 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 parent resource whose docker images will be listed. + * @param {number} request.pageSize + * The maximum number of artifacts to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 + * [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage}. 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/artifact_registry.list_docker_images.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async + */ + listDockerImagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listDockerImages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDockerImages.asyncIterate( + this.innerApiCalls['listDockerImages'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists repositories. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [Repository]{@link google.devtools.artifactregistry.v1.Repository}. + * 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 `listRepositoriesAsync()` + * 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. + */ + listRepositories( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IRepository[], + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest | null, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + ] + >; + listRepositories( + request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IRepository + > + ): void; + listRepositories( + request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IRepository + > + ): void; + listRepositories( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IRepository + >, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IRepository + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IRepository[], + protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest | null, + protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listRepositories(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 parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [Repository]{@link google.devtools.artifactregistry.v1.Repository} 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 `listRepositoriesAsync()` + * 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. + */ + listRepositoriesStream( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.createStream( + this.innerApiCalls.listRepositories as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listRepositories`, 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 parent resource whose repositories will be listed. + * @param {number} request.pageSize + * The maximum number of repositories to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 + * [Repository]{@link google.devtools.artifactregistry.v1.Repository}. 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/artifact_registry.list_repositories.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async + */ + listRepositoriesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listRepositories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRepositories.asyncIterate( + this.innerApiCalls['listRepositories'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists packages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [Package]{@link google.devtools.artifactregistry.v1.Package}. + * 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 `listPackagesAsync()` + * 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. + */ + listPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IPackage[], + protos.google.devtools.artifactregistry.v1.IListPackagesRequest | null, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse + ] + >; + listPackages( + request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + | protos.google.devtools.artifactregistry.v1.IListPackagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IPackage + > + ): void; + listPackages( + request: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + | protos.google.devtools.artifactregistry.v1.IListPackagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IPackage + > + ): void; + listPackages( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + | protos.google.devtools.artifactregistry.v1.IListPackagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IPackage + >, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + | protos.google.devtools.artifactregistry.v1.IListPackagesResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IPackage + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IPackage[], + protos.google.devtools.artifactregistry.v1.IListPackagesRequest | null, + protos.google.devtools.artifactregistry.v1.IListPackagesResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listPackages(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 parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [Package]{@link google.devtools.artifactregistry.v1.Package} 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 `listPackagesAsync()` + * 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. + */ + listPackagesStream( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPackages.createStream( + this.innerApiCalls.listPackages as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPackages`, 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 parent resource whose packages will be listed. + * @param {number} request.pageSize + * The maximum number of packages to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 + * [Package]{@link google.devtools.artifactregistry.v1.Package}. 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/artifact_registry.list_packages.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListPackages_async + */ + listPackagesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListPackagesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listPackages']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPackages.asyncIterate( + this.innerApiCalls['listPackages'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists versions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @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 [Version]{@link google.devtools.artifactregistry.v1.Version}. + * 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 `listVersionsAsync()` + * 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. + */ + listVersions( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IVersion[], + protos.google.devtools.artifactregistry.v1.IListVersionsRequest | null, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse + ] + >; + listVersions( + request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + | protos.google.devtools.artifactregistry.v1.IListVersionsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IVersion + > + ): void; + listVersions( + request: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + | protos.google.devtools.artifactregistry.v1.IListVersionsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IVersion + > + ): void; + listVersions( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + | protos.google.devtools.artifactregistry.v1.IListVersionsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IVersion + >, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + | protos.google.devtools.artifactregistry.v1.IListVersionsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.IVersion + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.IVersion[], + protos.google.devtools.artifactregistry.v1.IListVersionsRequest | null, + protos.google.devtools.artifactregistry.v1.IListVersionsResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listVersions(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 + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @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 [Version]{@link google.devtools.artifactregistry.v1.Version} 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 `listVersionsAsync()` + * 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. + */ + listVersionsStream( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVersions.createStream( + this.innerApiCalls.listVersions as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVersions`, 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 + * The name of the parent resource whose versions will be listed. + * @param {number} request.pageSize + * The maximum number of versions to return. Maximum page size is 1,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {google.devtools.artifactregistry.v1.VersionView} request.view + * The view that should be returned in the response. + * @param {string} [request.orderBy] + * Optional. The field to order the results by. + * @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 - * [DockerImage]{@link google.devtools.artifactregistry.v1.DockerImage}. The API will be called under the hood as needed, once per the page, + * [Version]{@link google.devtools.artifactregistry.v1.Version}. 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/artifact_registry.list_docker_images.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async + * @example include:samples/generated/v1/artifact_registry.list_versions.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListVersions_async */ - listDockerImagesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, + listVersionsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListVersionsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -617,93 +3495,109 @@ export class ArtifactRegistryClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listDockerImages']; + const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDockerImages.asyncIterate( - this.innerApiCalls['listDockerImages'] as GaxCall, + return this.descriptors.page.listVersions.asyncIterate( + this.innerApiCalls['listVersions'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists repositories. + * Lists files. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be listed. + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. * @param {number} request.pageSize - * The maximum number of repositories to return. + * The maximum number of files to return. * @param {string} request.pageToken * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. * @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 [Repository]{@link google.devtools.artifactregistry.v1.Repository}. + * The first element of the array is Array of [File]{@link google.devtools.artifactregistry.v1.File}. * 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 `listRepositoriesAsync()` + * We recommend using `listFilesAsync()` * 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. */ - listRepositories( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listFiles( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, options?: CallOptions ): Promise< [ - protos.google.devtools.artifactregistry.v1.IRepository[], - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest | null, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IFile[], + protos.google.devtools.artifactregistry.v1.IListFilesRequest | null, + protos.google.devtools.artifactregistry.v1.IListFilesResponse ] >; - listRepositories( - request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listFiles( + request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + | protos.google.devtools.artifactregistry.v1.IListFilesResponse | null | undefined, - protos.google.devtools.artifactregistry.v1.IRepository + protos.google.devtools.artifactregistry.v1.IFile > ): void; - listRepositories( - request: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listFiles( + request: protos.google.devtools.artifactregistry.v1.IListFilesRequest, callback: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + | protos.google.devtools.artifactregistry.v1.IListFilesResponse | null | undefined, - protos.google.devtools.artifactregistry.v1.IRepository + protos.google.devtools.artifactregistry.v1.IFile > ): void; - listRepositories( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listFiles( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + | protos.google.devtools.artifactregistry.v1.IListFilesResponse | null | undefined, - protos.google.devtools.artifactregistry.v1.IRepository + protos.google.devtools.artifactregistry.v1.IFile >, callback?: PaginationCallback< - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, - | protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IListFilesRequest, + | protos.google.devtools.artifactregistry.v1.IListFilesResponse | null | undefined, - protos.google.devtools.artifactregistry.v1.IRepository + protos.google.devtools.artifactregistry.v1.IFile > ): Promise< [ - protos.google.devtools.artifactregistry.v1.IRepository[], - protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest | null, - protos.google.devtools.artifactregistry.v1.IListRepositoriesResponse + protos.google.devtools.artifactregistry.v1.IFile[], + protos.google.devtools.artifactregistry.v1.IListFilesRequest | null, + protos.google.devtools.artifactregistry.v1.IListFilesResponse ] > | void { request = request || {}; @@ -722,7 +3616,7 @@ export class ArtifactRegistryClient { parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.listRepositories(request, options, callback); + return this.innerApiCalls.listFiles(request, options, callback); } /** @@ -730,25 +3624,266 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource whose repositories will be listed. + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of files to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. + * @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 [File]{@link google.devtools.artifactregistry.v1.File} 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 `listFilesAsync()` + * 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. + */ + listFilesStream( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFiles.createStream( + this.innerApiCalls.listFiles as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFiles`, 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 + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `name` + * * `owner` + * + * An example of using a filter: + * + * * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + * ID starting with "a/b/". + * * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + * Files owned by the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of files to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @param {string} request.orderBy + * The field to order the results by. + * @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 + * [File]{@link google.devtools.artifactregistry.v1.File}. 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/artifact_registry.list_files.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListFiles_async + */ + listFilesAsync( + request?: protos.google.devtools.artifactregistry.v1.IListFilesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const defaultCallSettings = this._defaults['listFiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFiles.asyncIterate( + this.innerApiCalls['listFiles'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + /** + * Lists tags. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. + * @param {number} request.pageSize + * The maximum number of tags to return. Maximum page size is 10,000. + * @param {string} request.pageToken + * The next_page_token value returned from a previous list request, if any. + * @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 [Tag]{@link google.devtools.artifactregistry.v1.Tag}. + * 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 `listTagsAsync()` + * 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. + */ + listTags( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag[], + protos.google.devtools.artifactregistry.v1.IListTagsRequest | null, + protos.google.devtools.artifactregistry.v1.IListTagsResponse + ] + >; + listTags( + request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + | protos.google.devtools.artifactregistry.v1.IListTagsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.ITag + > + ): void; + listTags( + request: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + callback: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + | protos.google.devtools.artifactregistry.v1.IListTagsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.ITag + > + ): void; + listTags( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + | protos.google.devtools.artifactregistry.v1.IListTagsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.ITag + >, + callback?: PaginationCallback< + protos.google.devtools.artifactregistry.v1.IListTagsRequest, + | protos.google.devtools.artifactregistry.v1.IListTagsResponse + | null + | undefined, + protos.google.devtools.artifactregistry.v1.ITag + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1.ITag[], + protos.google.devtools.artifactregistry.v1.IListTagsRequest | null, + protos.google.devtools.artifactregistry.v1.IListTagsResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listTags(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 + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. * @param {number} request.pageSize - * The maximum number of repositories to return. + * The maximum number of tags to return. Maximum page size is 10,000. * @param {string} request.pageToken * The next_page_token value returned from a previous list request, if any. * @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 [Repository]{@link google.devtools.artifactregistry.v1.Repository} on 'data' event. + * An object stream which emits an object representing [Tag]{@link google.devtools.artifactregistry.v1.Tag} 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 `listRepositoriesAsync()` + * We recommend using `listTagsAsync()` * 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. */ - listRepositoriesStream( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listTagsStream( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -759,26 +3894,36 @@ export class ArtifactRegistryClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listRepositories']; + const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listRepositories.createStream( - this.innerApiCalls.listRepositories as gax.GaxCall, + return this.descriptors.page.listTags.createStream( + this.innerApiCalls.listTags as gax.GaxCall, request, callSettings ); } /** - * Equivalent to `listRepositories`, but returns an iterable object. + * Equivalent to `listTags`, 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 parent resource whose repositories will be listed. + * The name of the parent resource whose tags will be listed. + * @param {string} request.filter + * An expression for filtering the results of the request. Filter rules are + * case insensitive. The fields eligible for filtering are: + * + * * `version` + * + * An example of using a filter: + * + * * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + * --> Tags that are applied to the version `1.0` in package `pkg1`. * @param {number} request.pageSize - * The maximum number of repositories to return. + * The maximum number of tags to return. Maximum page size is 10,000. * @param {string} request.pageToken * The next_page_token value returned from a previous list request, if any. * @param {object} [options] @@ -786,18 +3931,18 @@ export class ArtifactRegistryClient { * @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 - * [Repository]{@link google.devtools.artifactregistry.v1.Repository}. The API will be called under the hood as needed, once per the page, + * [Tag]{@link google.devtools.artifactregistry.v1.Tag}. 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/artifact_registry.list_repositories.js - * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async + * @example include:samples/generated/v1/artifact_registry.list_tags.js + * region_tag:artifactregistry_v1_generated_ArtifactRegistry_ListTags_async */ - listRepositoriesAsync( - request?: protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, + listTagsAsync( + request?: protos.google.devtools.artifactregistry.v1.IListTagsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -806,19 +3951,90 @@ export class ArtifactRegistryClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const defaultCallSettings = this._defaults['listRepositories']; + const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listRepositories.asyncIterate( - this.innerApiCalls['listRepositories'] as GaxCall, + return this.descriptors.page.listTags.asyncIterate( + this.innerApiCalls['listTags'] as GaxCall, request as unknown as RequestType, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } // -------------------- // -- Path templates -- // -------------------- + /** + * Return a fully-qualified aptArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} apt_artifact + * @returns {string} Resource name string. + */ + aptArtifactPath( + project: string, + location: string, + repository: string, + aptArtifact: string + ) { + return this.pathTemplates.aptArtifactPathTemplate.render({ + project: project, + location: location, + repository: repository, + apt_artifact: aptArtifact, + }); + } + + /** + * Parse the project from AptArtifact resource. + * + * @param {string} aptArtifactName + * A fully-qualified path representing AptArtifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAptArtifactName(aptArtifactName: string) { + return this.pathTemplates.aptArtifactPathTemplate.match(aptArtifactName) + .project; + } + + /** + * Parse the location from AptArtifact resource. + * + * @param {string} aptArtifactName + * A fully-qualified path representing AptArtifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAptArtifactName(aptArtifactName: string) { + return this.pathTemplates.aptArtifactPathTemplate.match(aptArtifactName) + .location; + } + + /** + * Parse the repository from AptArtifact resource. + * + * @param {string} aptArtifactName + * A fully-qualified path representing AptArtifact resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromAptArtifactName(aptArtifactName: string) { + return this.pathTemplates.aptArtifactPathTemplate.match(aptArtifactName) + .repository; + } + + /** + * Parse the apt_artifact from AptArtifact resource. + * + * @param {string} aptArtifactName + * A fully-qualified path representing AptArtifact resource. + * @returns {string} A string representing the apt_artifact. + */ + matchAptArtifactFromAptArtifactName(aptArtifactName: string) { + return this.pathTemplates.aptArtifactPathTemplate.match(aptArtifactName) + .apt_artifact; + } + /** * Return a fully-qualified dockerImage resource name string. * @@ -890,6 +4106,98 @@ export class ArtifactRegistryClient { .docker_image; } + /** + * Return a fully-qualified file resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} file + * @returns {string} Resource name string. + */ + filePath( + project: string, + location: string, + repository: string, + file: string + ) { + return this.pathTemplates.filePathTemplate.render({ + project: project, + location: location, + repository: repository, + file: file, + }); + } + + /** + * Parse the project from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).project; + } + + /** + * Parse the location from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).location; + } + + /** + * Parse the repository from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).repository; + } + + /** + * Parse the file from File resource. + * + * @param {string} fileName + * A fully-qualified path representing File resource. + * @returns {string} A string representing the file. + */ + matchFileFromFileName(fileName: string) { + return this.pathTemplates.filePathTemplate.match(fileName).file; + } + + /** + * Return a fully-qualified projectSettings resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectSettingsPath(project: string) { + return this.pathTemplates.projectSettingsPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectSettings resource. + * + * @param {string} projectSettingsName + * A fully-qualified path representing ProjectSettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSettingsName(projectSettingsName: string) { + return this.pathTemplates.projectSettingsPathTemplate.match( + projectSettingsName + ).project; + } + /** * Return a fully-qualified repository resource name string. * @@ -942,6 +4250,239 @@ export class ArtifactRegistryClient { .repository; } + /** + * Return a fully-qualified tag resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} packageParam + * @param {string} tag + * @returns {string} Resource name string. + */ + tagPath( + project: string, + location: string, + repository: string, + packageParam: string, + tag: string + ) { + return this.pathTemplates.tagPathTemplate.render({ + project: project, + location: location, + repository: repository, + package: packageParam, + tag: tag, + }); + } + + /** + * Parse the project from Tag resource. + * + * @param {string} tagName + * A fully-qualified path representing Tag resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTagName(tagName: string) { + return this.pathTemplates.tagPathTemplate.match(tagName).project; + } + + /** + * Parse the location from Tag resource. + * + * @param {string} tagName + * A fully-qualified path representing Tag resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTagName(tagName: string) { + return this.pathTemplates.tagPathTemplate.match(tagName).location; + } + + /** + * Parse the repository from Tag resource. + * + * @param {string} tagName + * A fully-qualified path representing Tag resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromTagName(tagName: string) { + return this.pathTemplates.tagPathTemplate.match(tagName).repository; + } + + /** + * Parse the package from Tag resource. + * + * @param {string} tagName + * A fully-qualified path representing Tag resource. + * @returns {string} A string representing the package. + */ + matchPackageFromTagName(tagName: string) { + return this.pathTemplates.tagPathTemplate.match(tagName).package; + } + + /** + * Parse the tag from Tag resource. + * + * @param {string} tagName + * A fully-qualified path representing Tag resource. + * @returns {string} A string representing the tag. + */ + matchTagFromTagName(tagName: string) { + return this.pathTemplates.tagPathTemplate.match(tagName).tag; + } + + /** + * Return a fully-qualified version resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} packageParam + * @param {string} version + * @returns {string} Resource name string. + */ + versionPath( + project: string, + location: string, + repository: string, + packageParam: string, + version: string + ) { + return this.pathTemplates.versionPathTemplate.render({ + project: project, + location: location, + repository: repository, + package: packageParam, + version: version, + }); + } + + /** + * Parse the project from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).project; + } + + /** + * Parse the location from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).location; + } + + /** + * Parse the repository from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).repository; + } + + /** + * Parse the package from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the package. + */ + matchPackageFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).package; + } + + /** + * Parse the version from Version resource. + * + * @param {string} versionName + * A fully-qualified path representing Version resource. + * @returns {string} A string representing the version. + */ + matchVersionFromVersionName(versionName: string) { + return this.pathTemplates.versionPathTemplate.match(versionName).version; + } + + /** + * Return a fully-qualified yumArtifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} repository + * @param {string} yum_artifact + * @returns {string} Resource name string. + */ + yumArtifactPath( + project: string, + location: string, + repository: string, + yumArtifact: string + ) { + return this.pathTemplates.yumArtifactPathTemplate.render({ + project: project, + location: location, + repository: repository, + yum_artifact: yumArtifact, + }); + } + + /** + * Parse the project from YumArtifact resource. + * + * @param {string} yumArtifactName + * A fully-qualified path representing YumArtifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromYumArtifactName(yumArtifactName: string) { + return this.pathTemplates.yumArtifactPathTemplate.match(yumArtifactName) + .project; + } + + /** + * Parse the location from YumArtifact resource. + * + * @param {string} yumArtifactName + * A fully-qualified path representing YumArtifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromYumArtifactName(yumArtifactName: string) { + return this.pathTemplates.yumArtifactPathTemplate.match(yumArtifactName) + .location; + } + + /** + * Parse the repository from YumArtifact resource. + * + * @param {string} yumArtifactName + * A fully-qualified path representing YumArtifact resource. + * @returns {string} A string representing the repository. + */ + matchRepositoryFromYumArtifactName(yumArtifactName: string) { + return this.pathTemplates.yumArtifactPathTemplate.match(yumArtifactName) + .repository; + } + + /** + * Parse the yum_artifact from YumArtifact resource. + * + * @param {string} yumArtifactName + * A fully-qualified path representing YumArtifact resource. + * @returns {string} A string representing the yum_artifact. + */ + matchYumArtifactFromYumArtifactName(yumArtifactName: string) { + return this.pathTemplates.yumArtifactPathTemplate.match(yumArtifactName) + .yum_artifact; + } + /** * Terminate the gRPC channel and close the client. * @@ -953,6 +4494,7 @@ export class ArtifactRegistryClient { return this.artifactRegistryStub.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json index 459caf39841..7dcb4e8a540 100644 --- a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json +++ b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client_config.json @@ -25,6 +25,21 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "GetDockerImage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportAptArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportYumArtifacts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListRepositories": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", @@ -34,6 +49,111 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteRepository": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPackages": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePackage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVersions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListFiles": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetFile": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTags": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTag": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetProjectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateProjectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json index f7058be7f9d..8ebf6dc0c06 100644 --- a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json +++ b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_proto_list.json @@ -1,5 +1,12 @@ [ + "../../protos/google/devtools/artifactregistry/v1/apt_artifact.proto", "../../protos/google/devtools/artifactregistry/v1/artifact.proto", + "../../protos/google/devtools/artifactregistry/v1/file.proto", + "../../protos/google/devtools/artifactregistry/v1/package.proto", "../../protos/google/devtools/artifactregistry/v1/repository.proto", - "../../protos/google/devtools/artifactregistry/v1/service.proto" + "../../protos/google/devtools/artifactregistry/v1/service.proto", + "../../protos/google/devtools/artifactregistry/v1/settings.proto", + "../../protos/google/devtools/artifactregistry/v1/tag.proto", + "../../protos/google/devtools/artifactregistry/v1/version.proto", + "../../protos/google/devtools/artifactregistry/v1/yum_artifact.proto" ] diff --git a/packages/google-devtools-artifactregistry/src/v1/gapic_metadata.json b/packages/google-devtools-artifactregistry/src/v1/gapic_metadata.json index 72bbf02bfaf..3d669d5364c 100644 --- a/packages/google-devtools-artifactregistry/src/v1/gapic_metadata.json +++ b/packages/google-devtools-artifactregistry/src/v1/gapic_metadata.json @@ -10,11 +10,111 @@ "grpc": { "libraryClient": "ArtifactRegistryClient", "rpcs": { + "GetDockerImage": { + "methods": [ + "getDockerImage" + ] + }, "GetRepository": { "methods": [ "getRepository" ] }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, "ListDockerImages": { "methods": [ "listDockerImages", @@ -28,17 +128,145 @@ "listRepositoriesStream", "listRepositoriesAsync" ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] } } }, "grpc-fallback": { "libraryClient": "ArtifactRegistryClient", "rpcs": { + "GetDockerImage": { + "methods": [ + "getDockerImage" + ] + }, "GetRepository": { "methods": [ "getRepository" ] }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetPackage": { + "methods": [ + "getPackage" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetFile": { + "methods": [ + "getFile" + ] + }, + "GetTag": { + "methods": [ + "getTag" + ] + }, + "CreateTag": { + "methods": [ + "createTag" + ] + }, + "UpdateTag": { + "methods": [ + "updateTag" + ] + }, + "DeleteTag": { + "methods": [ + "deleteTag" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "DeletePackage": { + "methods": [ + "deletePackage" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, "ListDockerImages": { "methods": [ "listDockerImages", @@ -52,6 +280,34 @@ "listRepositoriesStream", "listRepositoriesAsync" ] + }, + "ListPackages": { + "methods": [ + "listPackages", + "listPackagesStream", + "listPackagesAsync" + ] + }, + "ListVersions": { + "methods": [ + "listVersions", + "listVersionsStream", + "listVersionsAsync" + ] + }, + "ListFiles": { + "methods": [ + "listFiles", + "listFilesStream", + "listFilesAsync" + ] + }, + "ListTags": { + "methods": [ + "listTags", + "listTagsStream", + "listTagsAsync" + ] } } } diff --git a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts index f91e97ecbdc..6058ee07abb 100644 --- a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts +++ b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts @@ -25,7 +25,7 @@ import * as artifactregistryModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -51,6 +51,38 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + function stubPageStreamingCall( responses?: ResponseType[], error?: Error @@ -210,6 +242,132 @@ describe('v1.ArtifactRegistryClient', () => { assert.strictEqual(result, fakeProjectId); }); + describe('getDockerImage', () => { + it('invokes getDockerImage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ); + client.innerApiCalls.getDockerImage = stubSimpleCall(expectedResponse); + const [response] = await client.getDockerImage(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDockerImage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ); + client.innerApiCalls.getDockerImage = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDockerImage( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IDockerImage | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getDockerImage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDockerImage = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDockerImage(request), expectedError); + assert( + (client.innerApiCalls.getDockerImage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDockerImage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDockerImage(request), expectedError); + }); + }); + describe('getRepository', () => { it('invokes getRepository without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ @@ -336,18 +494,19 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('listDockerImages', () => { - it('invokes listDockerImages without error', async () => { + describe('updateRepository', () => { + it('invokes updateRepository without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; const expectedOptions = { otherArgs: { headers: { @@ -355,38 +514,31 @@ describe('v1.ArtifactRegistryClient', () => { }, }, }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - ]; - client.innerApiCalls.listDockerImages = stubSimpleCall(expectedResponse); - const [response] = await client.listDockerImages(request); + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCall(expectedResponse); + const [response] = await client.updateRepository(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listDockerImages as SinonStub) + (client.innerApiCalls.updateRepository as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listDockerImages without error using callback', async () => { + it('invokes updateRepository without error using callback', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; const expectedOptions = { otherArgs: { headers: { @@ -394,27 +546,17 @@ describe('v1.ArtifactRegistryClient', () => { }, }, }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - ]; - client.innerApiCalls.listDockerImages = + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ); + client.innerApiCalls.updateRepository = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDockerImages( + client.updateRepository( request, ( err?: Error | null, - result?: - | protos.google.devtools.artifactregistry.v1.IDockerImage[] - | null + result?: protos.google.devtools.artifactregistry.v1.IRepository | null ) => { if (err) { reject(err); @@ -427,23 +569,24 @@ describe('v1.ArtifactRegistryClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listDockerImages as SinonStub) + (client.innerApiCalls.updateRepository as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listDockerImages with error', async () => { + it('invokes updateRepository with error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + request.repository = {}; + request.repository.name = ''; + const expectedHeaderRequestParams = 'repository.name='; const expectedOptions = { otherArgs: { headers: { @@ -452,100 +595,4165 @@ describe('v1.ArtifactRegistryClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listDockerImages = stubSimpleCall( + client.innerApiCalls.updateRepository = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listDockerImages(request), expectedError); + await assert.rejects(client.updateRepository(request), expectedError); assert( - (client.innerApiCalls.listDockerImages as SinonStub) + (client.innerApiCalls.updateRepository as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listDockerImagesStream without error', async () => { + it('invokes updateRepository with closed client', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() - ), - ]; - client.descriptors.page.listDockerImages.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listDockerImagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = - []; - stream.on( - 'data', - ( - response: protos.google.devtools.artifactregistry.v1.DockerImage - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); + request.repository = {}; + request.repository.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateRepository(request), expectedError); + }); + }); + + describe('getPackage', () => { + it('invokes getPackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.getPackage = stubSimpleCall(expectedResponse); + const [response] = await client.getPackage(request); + assert.deepStrictEqual(response, expectedResponse); assert( - (client.descriptors.page.listDockerImages.createStream as SinonStub) + (client.innerApiCalls.getPackage as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDockerImages, request) - ); - assert.strictEqual( - ( - client.descriptors.page.listDockerImages.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listDockerImagesStream with error', async () => { + it('invokes getPackage without error using callback', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listDockerImages.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listDockerImagesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = - []; - stream.on( - 'data', - ( - response: protos.google.devtools.artifactregistry.v1.DockerImage - ) => { - responses.push(response); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ); + client.innerApiCalls.getPackage = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPackage( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IPackage | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getPackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getPackage with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getPackage = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPackage(request), expectedError); + assert( + (client.innerApiCalls.getPackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getPackage with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetPackageRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPackage(request), expectedError); + }); + }); + + describe('getVersion', () => { + it('invokes getVersion without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getVersion(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getVersion without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ); + client.innerApiCalls.getVersion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVersion( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IVersion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getVersion with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getVersion = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getVersion(request), expectedError); + assert( + (client.innerApiCalls.getVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getVersion with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetVersionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVersion(request), expectedError); + }); + }); + + describe('getFile', () => { + it('invokes getFile without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.getFile = stubSimpleCall(expectedResponse); + const [response] = await client.getFile(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getFile without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ); + client.innerApiCalls.getFile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFile( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IFile | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getFile with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getFile = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFile(request), expectedError); + assert( + (client.innerApiCalls.getFile as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getFile with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetFileRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFile(request), expectedError); + }); + }); + + describe('getTag', () => { + it('invokes getTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.getTag = stubSimpleCall(expectedResponse); + const [response] = await client.getTag(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.getTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTag( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.ITag | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTag(request), expectedError); + assert( + (client.innerApiCalls.getTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetTagRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTag(request), expectedError); + }); + }); + + describe('createTag', () => { + it('invokes createTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); + const [response] = await client.createTag(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.createTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTag( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.ITag | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createTag(request), expectedError); + assert( + (client.innerApiCalls.createTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateTagRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createTag(request), expectedError); + }); + }); + + describe('updateTag', () => { + it('invokes updateTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag = {}; + request.tag.name = ''; + const expectedHeaderRequestParams = 'tag.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); + const [response] = await client.updateTag(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag = {}; + request.tag.name = ''; + const expectedHeaderRequestParams = 'tag.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Tag() + ); + client.innerApiCalls.updateTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTag( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.ITag | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag = {}; + request.tag.name = ''; + const expectedHeaderRequestParams = 'tag.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateTag(request), expectedError); + assert( + (client.innerApiCalls.updateTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() + ); + request.tag = {}; + request.tag.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateTag(request), expectedError); + }); + }); + + describe('deleteTag', () => { + it('invokes deleteTag without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); + const [response] = await client.deleteTag(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTag without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTag( + 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); + assert( + (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteTag with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteTag(request), expectedError); + assert( + (client.innerApiCalls.deleteTag as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteTag with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteTag(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.setIamPolicy(request), expectedError); + assert( + (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.IPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getIamPolicy(request), expectedError); + assert( + (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.testIamPermissions(request), expectedError); + assert( + (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('getProjectSettings', () => { + it('invokes getProjectSettings without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.getProjectSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getProjectSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.getProjectSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProjectSettings( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IProjectSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getProjectSettings with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getProjectSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getProjectSettings(request), expectedError); + assert( + (client.innerApiCalls.getProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProjectSettings(request), expectedError); + }); + }); + + describe('updateProjectSettings', () => { + it('invokes updateProjectSettings without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings = {}; + request.projectSettings.name = ''; + const expectedHeaderRequestParams = 'project_settings.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.updateProjectSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateProjectSettings(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateProjectSettings without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings = {}; + request.projectSettings.name = ''; + const expectedHeaderRequestParams = 'project_settings.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ProjectSettings() + ); + client.innerApiCalls.updateProjectSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProjectSettings( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IProjectSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateProjectSettings with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings = {}; + request.projectSettings.name = ''; + const expectedHeaderRequestParams = 'project_settings.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProjectSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateProjectSettings(request), + expectedError + ); + assert( + (client.innerApiCalls.updateProjectSettings as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateProjectSettings with closed client', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() + ); + request.projectSettings = {}; + request.projectSettings.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateProjectSettings(request), + expectedError + ); + }); + }); + + describe('importAptArtifacts', () => { + it('invokes importAptArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAptArtifacts = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importAptArtifacts(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes importAptArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAptArtifacts = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importAptArtifacts( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportAptArtifactsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes importAptArtifacts with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.importAptArtifacts(request), expectedError); + assert( + (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes importAptArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.importAptArtifacts = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importAptArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.importAptArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkImportAptArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportAptArtifactsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportAptArtifactsProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportAptArtifactsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('importYumArtifacts', () => { + it('invokes importYumArtifacts without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importYumArtifacts = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importYumArtifacts(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes importYumArtifacts without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importYumArtifacts = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importYumArtifacts( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1.IImportYumArtifactsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes importYumArtifacts with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.importYumArtifacts(request), expectedError); + assert( + (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes importYumArtifacts with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.importYumArtifacts = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importYumArtifacts(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.importYumArtifacts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkImportYumArtifactsProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportYumArtifactsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportYumArtifactsProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportYumArtifactsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createRepository', () => { + it('invokes createRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRepository = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRepository( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.artifactregistry.v1.IRepository, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createRepository with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRepository(request), expectedError); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createRepository with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createRepository = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRepository(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateRepositoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateRepositoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteRepository', () => { + it('invokes deleteRepository without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteRepository(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteRepository = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteRepository( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteRepository with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteRepository(request), expectedError); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteRepository with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteRepository = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteRepository(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteRepository as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteRepositoryProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteRepositoryProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteRepositoryProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteRepositoryProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deletePackage', () => { + it('invokes deletePackage without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePackage(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deletePackage without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePackage = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePackage( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deletePackage with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deletePackage(request), expectedError); + assert( + (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deletePackage with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePackage = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deletePackage(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deletePackage as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeletePackageProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeletePackageProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePackageProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeletePackageProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteVersion', () => { + it('invokes deleteVersion without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVersion(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteVersion without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVersion = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVersion( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.devtools.artifactregistry.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteVersion with call error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteVersion(request), expectedError); + assert( + (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteVersion with LRO error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteVersion(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteVersionProgress without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteVersionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVersionProgress with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteVersionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listDockerImages', () => { + it('invokes listDockerImages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + ]; + client.innerApiCalls.listDockerImages = stubSimpleCall(expectedResponse); + const [response] = await client.listDockerImages(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDockerImages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + ]; + client.innerApiCalls.listDockerImages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDockerImages( + request, + ( + err?: Error | null, + result?: + | protos.google.devtools.artifactregistry.v1.IDockerImage[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDockerImages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDockerImages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDockerImages(request), expectedError); + assert( + (client.innerApiCalls.listDockerImages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDockerImagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + ]; + client.descriptors.page.listDockerImages.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDockerImagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = + []; + stream.on( + 'data', + ( + response: protos.google.devtools.artifactregistry.v1.DockerImage + ) => { + 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.listDockerImages.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDockerImages, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listDockerImages.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listDockerImagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDockerImages.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDockerImagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.DockerImage[] = + []; + stream.on( + 'data', + ( + response: protos.google.devtools.artifactregistry.v1.DockerImage + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDockerImages.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDockerImages, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listDockerImages.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDockerImages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.DockerImage() + ), + ]; + client.descriptors.page.listDockerImages.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = + []; + const iterable = client.listDockerImagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDockerImages.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listDockerImages.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDockerImages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDockerImages.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDockerImagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDockerImages.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listDockerImages.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listRepositories', () => { + it('invokes listRepositories without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); + const [response] = await client.listRepositories(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositories without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + ]; + client.innerApiCalls.listRepositories = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRepositories( + request, + ( + err?: Error | null, + result?: + | protos.google.devtools.artifactregistry.v1.IRepository[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listRepositories with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listRepositories = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listRepositories(request), expectedError); + assert( + (client.innerApiCalls.listRepositories as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listRepositoriesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + ]; + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Repository) => { + 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.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listRepositoriesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listRepositoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Repository[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Repository) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listRepositories.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listRepositories, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Repository() + ), + ]; + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = + []; + const iterable = client.listRepositoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listRepositories with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listRepositories.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRepositoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listRepositories.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listPackages', () => { + it('invokes listPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + ]; + client.innerApiCalls.listPackages = stubSimpleCall(expectedResponse); + const [response] = await client.listPackages(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPackages without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + ]; + client.innerApiCalls.listPackages = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPackages( + request, + ( + err?: Error | null, + result?: + | protos.google.devtools.artifactregistry.v1.IPackage[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listPackages = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPackages(request), expectedError); + assert( + (client.innerApiCalls.listPackages as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listPackagesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + ]; + client.descriptors.page.listPackages.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Package[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Package) => { + 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.listPackages.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPackages, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPackages.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listPackagesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listPackagesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Package[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Package) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPackages.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPackages, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listPackages.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPackages without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Package() + ), + ]; + client.descriptors.page.listPackages.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = + []; + const iterable = client.listPackagesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPackages.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPackages.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listPackages with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listPackages.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPackagesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IPackage[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPackages.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listPackages.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listVersions', () => { + it('invokes listVersions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + ]; + client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listVersions(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVersions without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + ]; + client.innerApiCalls.listVersions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVersions( + request, + ( + err?: Error | null, + result?: + | protos.google.devtools.artifactregistry.v1.IVersion[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listVersions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listVersions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listVersions(request), expectedError); + assert( + (client.innerApiCalls.listVersions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listVersionsStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + ]; + client.descriptors.page.listVersions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Version[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Version) => { + 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.listVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listVersionsStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.Version[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.Version) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listVersions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVersions, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listVersions.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVersions without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.Version() + ), + ]; + client.descriptors.page.listVersions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = + []; + const iterable = client.listVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listVersions with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listVersions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.artifactregistry.v1.IVersion[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVersions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listVersions.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listFiles', () => { + it('invokes listFiles without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + ]; + client.innerApiCalls.listFiles = stubSimpleCall(expectedResponse); + const [response] = await client.listFiles(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listFiles as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listFiles without error using callback', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + ]; + client.innerApiCalls.listFiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFiles( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1.IFile[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listFiles as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listFiles with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listFiles = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFiles(request), expectedError); + assert( + (client.innerApiCalls.listFiles as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listFilesStream without error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.File() + ), + ]; + client.descriptors.page.listFiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.File[] = []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.File) => { + 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.listFiles.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFiles, request) + ); + assert.strictEqual( + (client.descriptors.page.listFiles.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listFilesStream with error', async () => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listFiles.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listFilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.artifactregistry.v1.File[] = []; + stream.on( + 'data', + (response: protos.google.devtools.artifactregistry.v1.File) => { + responses.push(response); } ); stream.on('end', () => { @@ -557,109 +4765,105 @@ describe('v1.ArtifactRegistryClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listDockerImages.createStream as SinonStub) + (client.descriptors.page.listFiles.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDockerImages, request) + .calledWith(client.innerApiCalls.listFiles, request) ); assert.strictEqual( - ( - client.descriptors.page.listDockerImages.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listFiles.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listDockerImages without error', async () => { + it('uses async iteration with listFiles without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() + new protos.google.devtools.artifactregistry.v1.File() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() + new protos.google.devtools.artifactregistry.v1.File() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.DockerImage() + new protos.google.devtools.artifactregistry.v1.File() ), ]; - client.descriptors.page.listDockerImages.asyncIterate = + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = - []; - const iterable = client.listDockerImagesAsync(request); + const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; + const iterable = client.listFilesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listDockerImages.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listFiles.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listDockerImages.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listFiles.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listDockerImages with error', async () => { + it('uses async iteration with listFiles with error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() + new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listDockerImages.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDockerImagesAsync(request); + client.descriptors.page.listFiles.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listFilesAsync(request); await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IDockerImage[] = + const responses: protos.google.devtools.artifactregistry.v1.IFile[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listDockerImages.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listFiles.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listDockerImages.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listFiles.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listRepositories', () => { - it('invokes listRepositories without error', async () => { + describe('listTags', () => { + it('invokes listTags without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -672,33 +4876,33 @@ describe('v1.ArtifactRegistryClient', () => { }; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), ]; - client.innerApiCalls.listRepositories = stubSimpleCall(expectedResponse); - const [response] = await client.listRepositories(request); + client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); + const [response] = await client.listTags(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listRepositories as SinonStub) + (client.innerApiCalls.listTags as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listRepositories without error using callback', async () => { + it('invokes listTags without error using callback', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -711,25 +4915,23 @@ describe('v1.ArtifactRegistryClient', () => { }; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), ]; - client.innerApiCalls.listRepositories = + client.innerApiCalls.listTags = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listRepositories( + client.listTags( request, ( err?: Error | null, - result?: - | protos.google.devtools.artifactregistry.v1.IRepository[] - | null + result?: protos.google.devtools.artifactregistry.v1.ITag[] | null ) => { if (err) { reject(err); @@ -742,20 +4944,20 @@ describe('v1.ArtifactRegistryClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listRepositories as SinonStub) + (client.innerApiCalls.listTags as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listRepositories with error', async () => { + it('invokes listTags with error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; @@ -767,49 +4969,45 @@ describe('v1.ArtifactRegistryClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listRepositories = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listRepositories(request), expectedError); + client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTags(request), expectedError); assert( - (client.innerApiCalls.listRepositories as SinonStub) + (client.innerApiCalls.listTags as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listRepositoriesStream without error', async () => { + it('invokes listTagsStream without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), ]; - client.descriptors.page.listRepositories.createStream = + client.descriptors.page.listTags.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRepositoriesStream(request); + const stream = client.listTagsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Repository[] = - []; + const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; stream.on( 'data', - (response: protos.google.devtools.artifactregistry.v1.Repository) => { + (response: protos.google.devtools.artifactregistry.v1.Tag) => { responses.push(response); } ); @@ -823,39 +5021,39 @@ describe('v1.ArtifactRegistryClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) + (client.descriptors.page.listTags.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listRepositories, request) + .calledWith(client.innerApiCalls.listTags, request) ); assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTags.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listRepositoriesStream with error', async () => { + it('invokes listTagsStream with error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listRepositoriesStream(request); + client.descriptors.page.listTags.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTagsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.artifactregistry.v1.Repository[] = - []; + const responses: protos.google.devtools.artifactregistry.v1.Tag[] = []; stream.on( 'data', - (response: protos.google.devtools.artifactregistry.v1.Repository) => { + (response: protos.google.devtools.artifactregistry.v1.Tag) => { responses.push(response); } ); @@ -868,101 +5066,172 @@ describe('v1.ArtifactRegistryClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listRepositories.createStream as SinonStub) + (client.descriptors.page.listTags.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listRepositories, request) + .calledWith(client.innerApiCalls.listTags, request) ); assert.strictEqual( - ( - client.descriptors.page.listRepositories.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTags.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listRepositories without error', async () => { + it('uses async iteration with listTags without error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.Repository() + new protos.google.devtools.artifactregistry.v1.Tag() ), ]; - client.descriptors.page.listRepositories.asyncIterate = + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = - []; - const iterable = client.listRepositoriesAsync(request); + const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; + const iterable = client.listTagsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listRepositories with error', async () => { + it('uses async iteration with listTags with error', async () => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() + new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listRepositories.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRepositoriesAsync(request); + client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTagsAsync(request); await assert.rejects(async () => { - const responses: protos.google.devtools.artifactregistry.v1.IRepository[] = - []; + const responses: protos.google.devtools.artifactregistry.v1.ITag[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) + .args[1], request ); assert.strictEqual( - ( - client.descriptors.page.listRepositories.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); describe('Path templates', () => { + describe('aptArtifact', () => { + const fakePath = '/rendered/path/aptArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + apt_artifact: 'aptArtifactValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aptArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.aptArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('aptArtifactPath', () => { + const result = client.aptArtifactPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'aptArtifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.aptArtifactPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAptArtifactName', () => { + const result = client.matchProjectFromAptArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.aptArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAptArtifactName', () => { + const result = client.matchLocationFromAptArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.aptArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromAptArtifactName', () => { + const result = client.matchRepositoryFromAptArtifactName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.aptArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAptArtifactFromAptArtifactName', () => { + const result = client.matchAptArtifactFromAptArtifactName(fakePath); + assert.strictEqual(result, 'aptArtifactValue'); + assert( + (client.pathTemplates.aptArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('dockerImage', () => { const fakePath = '/rendered/path/dockerImage'; const expectedParameters = { @@ -1039,6 +5308,120 @@ describe('v1.ArtifactRegistryClient', () => { }); }); + describe('file', () => { + const fakePath = '/rendered/path/file'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + file: 'fileValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.filePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.filePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('filePath', () => { + const result = client.filePath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'fileValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.filePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFileName', () => { + const result = client.matchProjectFromFileName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFileName', () => { + const result = client.matchLocationFromFileName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromFileName', () => { + const result = client.matchRepositoryFromFileName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFileFromFileName', () => { + const result = client.matchFileFromFileName(fakePath); + assert.strictEqual(result, 'fileValue'); + assert( + (client.pathTemplates.filePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectSettings', () => { + const fakePath = '/rendered/path/projectSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectSettingsPath', () => { + const result = client.projectSettingsPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectSettingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectSettingsName', () => { + const result = client.matchProjectFromProjectSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('repository', () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { @@ -1102,5 +5485,257 @@ describe('v1.ArtifactRegistryClient', () => { ); }); }); + + describe('tag', () => { + const fakePath = '/rendered/path/tag'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + package: 'packageValue', + tag: 'tagValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagPath', () => { + const result = client.tagPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'packageValue', + 'tagValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTagName', () => { + const result = client.matchProjectFromTagName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTagName', () => { + const result = client.matchLocationFromTagName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromTagName', () => { + const result = client.matchRepositoryFromTagName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.tagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPackageFromTagName', () => { + const result = client.matchPackageFromTagName(fakePath); + assert.strictEqual(result, 'packageValue'); + assert( + (client.pathTemplates.tagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagFromTagName', () => { + const result = client.matchTagFromTagName(fakePath); + assert.strictEqual(result, 'tagValue'); + assert( + (client.pathTemplates.tagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('version', () => { + const fakePath = '/rendered/path/version'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + package: 'packageValue', + version: 'versionValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.versionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.versionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('versionPath', () => { + const result = client.versionPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'packageValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.versionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVersionName', () => { + const result = client.matchProjectFromVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVersionName', () => { + const result = client.matchLocationFromVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromVersionName', () => { + const result = client.matchRepositoryFromVersionName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPackageFromVersionName', () => { + const result = client.matchPackageFromVersionName(fakePath); + assert.strictEqual(result, 'packageValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromVersionName', () => { + const result = client.matchVersionFromVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.versionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('yumArtifact', () => { + const fakePath = '/rendered/path/yumArtifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + yum_artifact: 'yumArtifactValue', + }; + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.yumArtifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.yumArtifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('yumArtifactPath', () => { + const result = client.yumArtifactPath( + 'projectValue', + 'locationValue', + 'repositoryValue', + 'yumArtifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.yumArtifactPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromYumArtifactName', () => { + const result = client.matchProjectFromYumArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.yumArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromYumArtifactName', () => { + const result = client.matchLocationFromYumArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.yumArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRepositoryFromYumArtifactName', () => { + const result = client.matchRepositoryFromYumArtifactName(fakePath); + assert.strictEqual(result, 'repositoryValue'); + assert( + (client.pathTemplates.yumArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchYumArtifactFromYumArtifactName', () => { + const result = client.matchYumArtifactFromYumArtifactName(fakePath); + assert.strictEqual(result, 'yumArtifactValue'); + assert( + (client.pathTemplates.yumArtifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); });