From 7788daa2698b05073d5b07ac9e923d8598418e2c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:32:11 +0000 Subject: [PATCH] chore: update v2.14.2 gapic-generator-typescript (#121) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 chore: update v2.14.1 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 433031262 Source-Link: https://github.com/googleapis/googleapis/commit/2a55d13d9dc6cbf99990d1ab490e0ea07b5e7649 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2fce3893ae9da47763e0872c4a3a87d9ff78771f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZjZTM4OTNhZTlkYTQ3NzYzZTA4NzJjNGEzYTg3ZDlmZjc4NzcxZiJ9 docs: more details for ListFilesRequest parent field PiperOrigin-RevId: 431979329 Source-Link: https://github.com/googleapis/googleapis/commit/8febda4c94c1e6193c3eb17e955b0c998c56e8f0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1048231cea49f261c90ca361258c57636ca98c6d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTA0ODIzMWNlYTQ5ZjI2MWM5MGNhMzYxMjU4YzU3NjM2Y2E5OGM2ZCJ9 docs(samples): include metadata file, add exclusions for samples to handwritten libraries PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- linkinator.config.json | 10 +- package.json | 2 +- .../v1beta2/apt_artifact.proto | 117 + .../artifactregistry/v1beta2/file.proto | 11 +- .../artifactregistry/v1beta2/repository.proto | 92 +- .../artifactregistry/v1beta2/service.proto | 65 +- .../artifactregistry/v1beta2/settings.proto | 57 +- .../artifactregistry/v1beta2/tag.proto | 16 +- .../artifactregistry/v1beta2/version.proto | 50 +- .../v1beta2/yum_artifact.proto | 109 + protos/protos.d.ts | 5580 +++-- protos/protos.js | 16887 ++++++++++------ protos/protos.json | 581 +- .../v1/artifact_registry.get_repository.js | 9 +- .../artifact_registry.list_docker_images.js | 9 +- .../v1/artifact_registry.list_repositories.js | 9 +- ...a.google.devtools.artifactregistry.v1.json | 151 + .../artifact_registry.create_repository.js | 14 +- .../v1beta2/artifact_registry.create_tag.js | 9 +- .../artifact_registry.delete_package.js | 9 +- .../artifact_registry.delete_repository.js | 14 +- .../v1beta2/artifact_registry.delete_tag.js | 9 +- .../artifact_registry.delete_version.js | 9 +- .../v1beta2/artifact_registry.get_file.js | 9 +- .../artifact_registry.get_iam_policy.js | 9 +- .../v1beta2/artifact_registry.get_package.js | 9 +- .../artifact_registry.get_project_settings.js | 58 + .../artifact_registry.get_repository.js | 14 +- .../v1beta2/artifact_registry.get_tag.js | 9 +- .../v1beta2/artifact_registry.get_version.js | 9 +- .../artifact_registry.import_apt_artifacts.js | 62 + .../artifact_registry.import_yum_artifacts.js | 62 + .../v1beta2/artifact_registry.list_files.js | 12 +- .../artifact_registry.list_packages.js | 9 +- .../artifact_registry.list_repositories.js | 17 +- .../v1beta2/artifact_registry.list_tags.js | 12 +- .../artifact_registry.list_versions.js | 16 +- .../artifact_registry.set_iam_policy.js | 9 +- .../artifact_registry.test_iam_permissions.js | 9 +- ...tifact_registry.update_project_settings.js | 61 + .../artifact_registry.update_repository.js | 9 +- .../v1beta2/artifact_registry.update_tag.js | 9 +- ...gle.devtools.artifactregistry.v1beta2.json | 1127 ++ src/v1/artifact_registry_client.ts | 5 +- src/v1beta2/artifact_registry_client.ts | 939 +- .../artifact_registry_client_config.json | 16 + src/v1beta2/artifact_registry_proto_list.json | 4 +- src/v1beta2/gapic_metadata.json | 40 + test/gapic_artifact_registry_v1.ts | 34 +- test/gapic_artifact_registry_v1beta2.ts | 1219 +- 50 files changed, 19606 insertions(+), 8001 deletions(-) create mode 100644 protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto create mode 100644 protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto create mode 100644 samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json create mode 100644 samples/generated/v1beta2/artifact_registry.get_project_settings.js create mode 100644 samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js create mode 100644 samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js create mode 100644 samples/generated/v1beta2/artifact_registry.update_project_settings.js create mode 100644 samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json diff --git a/linkinator.config.json b/linkinator.config.json index 0121dfa..befd23c 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/package.json b/package.json index 0359048..25455a1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^2.30.1" }, "devDependencies": { "@types/mocha": "^8.0.4", diff --git a/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto b/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto new file mode 100644 index 0000000..338b216 --- /dev/null +++ b/protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto @@ -0,0 +1,117 @@ +// 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.v1beta2; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "AptArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// 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 artifacts that were not imported. + repeated ImportAptArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportAptArtifactsMetadata { +} diff --git a/protos/google/devtools/artifactregistry/v1beta2/file.proto b/protos/google/devtools/artifactregistry/v1beta2/file.proto index f69f393..0313c49 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/file.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/file.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1beta2; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; @@ -37,6 +37,9 @@ message Hash { // SHA256 hash. SHA256 = 1; + + // MD5 hash. + MD5 = 2; } // The algorithm used to compute the hash value. @@ -54,7 +57,8 @@ message File { }; // The name of the file, for example: - // "projects/p1/locations/us-central1/repositories/repo1/files/a/b/c.txt". + // "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. @@ -75,7 +79,8 @@ message File { // The request to list files. message ListFilesRequest { - // The name of the parent resource whose files will be listed. + // 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 diff --git a/protos/google/devtools/artifactregistry/v1beta2/repository.proto b/protos/google/devtools/artifactregistry/v1beta2/repository.proto index 633d5c7..b9691d3 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/repository.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/repository.proto @@ -16,10 +16,11 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1beta2; +import "google/api/annotations.proto"; +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.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; @@ -36,6 +37,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. @@ -43,6 +70,28 @@ message Repository { // Docker package format. DOCKER = 1; + + // Maven package format. + MAVEN = 2; + + // NPM package format. + NPM = 3; + + // APT package format. + APT = 5; + + // YUM package format. + YUM = 6; + + // Python package format. + 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: @@ -77,11 +126,15 @@ message Repository { // The request to list repositories. message ListRepositoriesRequest { - // The name of the parent resource whose repositories will be listed. - string parent = 1; - - // The maximum number of repositories to return. - // Maximum page size is 10,000. + // Required. The name of the parent resource whose repositories will be listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "artifactregistry.googleapis.com/Repository" + } + ]; + + // 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. @@ -100,14 +153,24 @@ message ListRepositoriesResponse { // The request to retrieve a repository. message GetRepositoryRequest { - // The name of the repository to retrieve. - string name = 1; + // Required. The name of the repository to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + } + ]; } // The request to create a new repository. message CreateRepositoryRequest { - // The name of the parent resource where the repository will be created. - string parent = 1; + // 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; @@ -129,6 +192,11 @@ message UpdateRepositoryRequest { // The request to delete a repository. message DeleteRepositoryRequest { - // The name of the repository to delete. - string name = 1; + // 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/protos/google/devtools/artifactregistry/v1beta2/service.proto b/protos/google/devtools/artifactregistry/v1beta2/service.proto index b148e3e..abc4519 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/service.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/service.proto @@ -18,11 +18,14 @@ package google.devtools.artifactregistry.v1beta2; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/devtools/artifactregistry/v1beta2/apt_artifact.proto"; import "google/devtools/artifactregistry/v1beta2/file.proto"; import "google/devtools/artifactregistry/v1beta2/package.proto"; import "google/devtools/artifactregistry/v1beta2/repository.proto"; +import "google/devtools/artifactregistry/v1beta2/settings.proto"; import "google/devtools/artifactregistry/v1beta2/tag.proto"; import "google/devtools/artifactregistry/v1beta2/version.proto"; +import "google/devtools/artifactregistry/v1beta2/yum_artifact.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; @@ -55,6 +58,36 @@ service ArtifactRegistry { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/cloud-platform.read-only"; + // 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: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1beta2.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: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse" + metadata_type: "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata" + }; + } + // Lists repositories. rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) { option (google.api.http) = { @@ -80,8 +113,8 @@ service ArtifactRegistry { }; option (google.api.method_signature) = "parent,repository,repository_id"; option (google.longrunning.operation_info) = { - response_type: "Repository" - metadata_type: "OperationMetadata" + response_type: "google.devtools.artifactregistry.v1beta2.Repository" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" }; } @@ -104,7 +137,7 @@ service ArtifactRegistry { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" }; } @@ -133,7 +166,7 @@ service ArtifactRegistry { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" }; } @@ -162,7 +195,7 @@ service ArtifactRegistry { option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" + metadata_type: "google.devtools.artifactregistry.v1beta2.OperationMetadata" }; } @@ -246,6 +279,26 @@ service ArtifactRegistry { body: "*" }; } + + // Retrieves the Settings for the Project. + rpc GetProjectSettings(GetProjectSettingsRequest) returns (ProjectSettings) { + option (google.api.http) = { + get: "/v1beta2/{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: "/v1beta2/{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 {} +message OperationMetadata { + +} diff --git a/protos/google/devtools/artifactregistry/v1beta2/settings.proto b/protos/google/devtools/artifactregistry/v1beta2/settings.proto index dcbbb0a..4c2cb9a 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/settings.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/settings.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1beta2; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; @@ -28,3 +28,58 @@ option java_outer_classname = "SettingsProto"; option java_package = "com.google.devtools.artifactregistry.v1beta2"; option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// 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/protos/google/devtools/artifactregistry/v1beta2/tag.proto b/protos/google/devtools/artifactregistry/v1beta2/tag.proto index 8e73e34..5faeba4 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/tag.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/tag.proto @@ -16,8 +16,9 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1beta2; -import "google/protobuf/field_mask.proto"; import "google/api/annotations.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; @@ -30,12 +31,22 @@ option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; // 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; } @@ -55,8 +66,7 @@ message ListTagsRequest { // --> 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. + // 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. diff --git a/protos/google/devtools/artifactregistry/v1beta2/version.proto b/protos/google/devtools/artifactregistry/v1beta2/version.proto index c8ffa41..12cf213 100644 --- a/protos/google/devtools/artifactregistry/v1beta2/version.proto +++ b/protos/google/devtools/artifactregistry/v1beta2/version.proto @@ -16,9 +16,12 @@ syntax = "proto3"; package google.devtools.artifactregistry.v1beta2; +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/devtools/artifactregistry/v1beta2/tag.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; @@ -28,12 +31,33 @@ option java_package = "com.google.devtools.artifactregistry.v1beta2"; option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; +// 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. @@ -48,20 +72,12 @@ message Version { // Output only. A list of related tags. Will contain up to 100 tags that // reference this version. repeated Tag related_tags = 7; -} -// 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; + // 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. @@ -69,8 +85,7 @@ 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 10,000. + // 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. @@ -78,6 +93,9 @@ message ListVersionsRequest { // 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. diff --git a/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto b/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto new file mode 100644 index 0000000..fcaadc8 --- /dev/null +++ b/protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto @@ -0,0 +1,109 @@ +// 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.v1beta2; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2"; +option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry"; +option java_multiple_files = true; +option java_outer_classname = "YumArtifactProto"; +option java_package = "com.google.devtools.artifactregistry.v1beta2"; +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2"; +option ruby_package = "Google::Cloud::ArtifactRegistry::V1beta2"; + +// 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 artifacts that were not imported. + repeated ImportYumArtifactsErrorInfo errors = 2; +} + +// The operation metadata for importing artifacts. +message ImportYumArtifactsMetadata { +} diff --git a/protos/protos.d.ts b/protos/protos.d.ts index b361917..7ce6122 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -869,3461 +869,5167 @@ export namespace google { /** Namespace v1beta2. */ namespace v1beta2 { - /** Properties of a Hash. */ - interface IHash { + /** Properties of an AptArtifact. */ + interface IAptArtifact { - /** Hash type */ - type?: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType|null); + /** AptArtifact name */ + name?: (string|null); - /** Hash value */ - value?: (Uint8Array|string|null); + /** AptArtifact packageName */ + packageName?: (string|null); + + /** AptArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType|null); + + /** AptArtifact architecture */ + architecture?: (string|null); + + /** AptArtifact component */ + component?: (string|null); + + /** AptArtifact controlFile */ + controlFile?: (Uint8Array|string|null); } - /** Represents a Hash. */ - class Hash implements IHash { + /** Represents an AptArtifact. */ + class AptArtifact implements IAptArtifact { /** - * Constructs a new Hash. + * Constructs a new AptArtifact. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IHash); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact); - /** Hash type. */ - public type: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType); + /** AptArtifact name. */ + public name: string; - /** Hash value. */ - public value: (Uint8Array|string); + /** AptArtifact packageName. */ + public packageName: string; + + /** AptArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType); + + /** AptArtifact architecture. */ + public architecture: string; + + /** AptArtifact component. */ + public component: string; + + /** AptArtifact controlFile. */ + public controlFile: (Uint8Array|string); /** - * Creates a new Hash instance using the specified properties. + * Creates a new AptArtifact instance using the specified properties. * @param [properties] Properties to set - * @returns Hash instance + * @returns AptArtifact instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IHash): google.devtools.artifactregistry.v1beta2.Hash; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IAptArtifact): google.devtools.artifactregistry.v1beta2.AptArtifact; /** - * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. - * @param message Hash message or plain object to encode + * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IAptArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Hash 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 Hash + * @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.v1beta2.Hash; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.AptArtifact; /** - * Decodes a Hash 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 Hash + * @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.v1beta2.Hash; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.AptArtifact; /** - * Verifies a Hash 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 Hash 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 Hash + * @returns AptArtifact */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Hash; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.AptArtifact; /** - * Creates a plain object from a Hash message. Also converts values to other types if specified. - * @param message Hash + * 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.v1beta2.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.AptArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Hash to JSON. + * Converts this AptArtifact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Hash { + namespace AptArtifact { - /** HashType enum. */ - enum HashType { - HASH_TYPE_UNSPECIFIED = 0, - SHA256 = 1 + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 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.v1beta2.IHash[]|null); - - /** File createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an ImportAptArtifactsGcsSource. */ + interface IImportAptArtifactsGcsSource { - /** File updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ImportAptArtifactsGcsSource uris */ + uris?: (string[]|null); - /** File owner */ - owner?: (string|null); + /** ImportAptArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); } - /** Represents a File. */ - class File implements IFile { + /** Represents an ImportAptArtifactsGcsSource. */ + class ImportAptArtifactsGcsSource implements IImportAptArtifactsGcsSource { /** - * Constructs a new File. + * Constructs a new ImportAptArtifactsGcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IFile); - - /** File name. */ - public name: string; - - /** File sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** File hashes. */ - public hashes: google.devtools.artifactregistry.v1beta2.IHash[]; - - /** File createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource); - /** File updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportAptArtifactsGcsSource uris. */ + public uris: string[]; - /** File owner. */ - public owner: string; + /** ImportAptArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; /** - * Creates a new File instance using the specified properties. + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns File instance + * @returns ImportAptArtifactsGcsSource instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IFile): google.devtools.artifactregistry.v1beta2.File; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; /** - * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. - * @param message File message or plain object to encode + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. - * @param message File message or plain object to encode + * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a File 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 File + * @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.v1beta2.File; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; /** - * Decodes a File 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 File + * @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.v1beta2.File; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; /** - * Verifies a File 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 File 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 File + * @returns ImportAptArtifactsGcsSource */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.File; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource; /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File + * 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.v1beta2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this File to JSON. + * Converts this ImportAptArtifactsGcsSource 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); + /** Properties of an ImportAptArtifactsRequest. */ + interface IImportAptArtifactsRequest { - /** ListFilesRequest pageSize */ - pageSize?: (number|null); + /** ImportAptArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - /** ListFilesRequest pageToken */ - pageToken?: (string|null); + /** ImportAptArtifactsRequest parent */ + parent?: (string|null); } - /** Represents a ListFilesRequest. */ - class ListFilesRequest implements IListFilesRequest { + /** Represents an ImportAptArtifactsRequest. */ + class ImportAptArtifactsRequest implements IImportAptArtifactsRequest { /** - * Constructs a new ListFilesRequest. + * Constructs a new ImportAptArtifactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesRequest); - - /** ListFilesRequest parent. */ - public parent: string; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest); - /** ListFilesRequest filter. */ - public filter: string; + /** ImportAptArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - /** ListFilesRequest pageSize. */ - public pageSize: number; + /** ImportAptArtifactsRequest parent. */ + public parent: string; - /** ListFilesRequest pageToken. */ - public pageToken: string; + /** ImportAptArtifactsRequest source. */ + public source?: "gcsSource"; /** - * Creates a new ListFilesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFilesRequest instance + * @returns ImportAptArtifactsRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListFilesRequest): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; /** - * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. - * @param message ListFilesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. - * @param message ListFilesRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFilesRequest 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 ListFilesRequest + * @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.v1beta2.ListFilesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; /** - * Decodes a ListFilesRequest 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 ListFilesRequest + * @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.v1beta2.ListFilesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; /** - * Verifies a ListFilesRequest 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 ListFilesRequest 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 ListFilesRequest + * @returns ImportAptArtifactsRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest; /** - * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. - * @param message ListFilesRequest + * 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.v1beta2.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFilesRequest to JSON. + * Converts this ImportAptArtifactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListFilesResponse. */ - interface IListFilesResponse { + /** Properties of an ImportAptArtifactsErrorInfo. */ + interface IImportAptArtifactsErrorInfo { - /** ListFilesResponse files */ - files?: (google.devtools.artifactregistry.v1beta2.IFile[]|null); + /** ImportAptArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - /** ListFilesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ImportAptArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); } - /** Represents a ListFilesResponse. */ - class ListFilesResponse implements IListFilesResponse { + /** Represents an ImportAptArtifactsErrorInfo. */ + class ImportAptArtifactsErrorInfo implements IImportAptArtifactsErrorInfo { /** - * Constructs a new ListFilesResponse. + * Constructs a new ImportAptArtifactsErrorInfo. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo); - /** ListFilesResponse files. */ - public files: google.devtools.artifactregistry.v1beta2.IFile[]; + /** ImportAptArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null); - /** ListFilesResponse nextPageToken. */ - public nextPageToken: string; + /** ImportAptArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportAptArtifactsErrorInfo source. */ + public source?: "gcsSource"; /** - * Creates a new ListFilesResponse instance using the specified properties. + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. * @param [properties] Properties to set - * @returns ListFilesResponse instance + * @returns ImportAptArtifactsErrorInfo instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; /** - * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. - * @param message ListFilesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. - * @param message ListFilesResponse message or plain object to encode + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFilesResponse 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 ListFilesResponse + * @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.v1beta2.ListFilesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; /** - * Decodes a ListFilesResponse 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 ListFilesResponse + * @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.v1beta2.ListFilesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; /** - * Verifies a ListFilesResponse 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 ListFilesResponse 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 ListFilesResponse + * @returns ImportAptArtifactsErrorInfo */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo; /** - * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. - * @param message ListFilesResponse + * 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.v1beta2.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFilesResponse to JSON. + * Converts this ImportAptArtifactsErrorInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetFileRequest. */ - interface IGetFileRequest { + /** Properties of an ImportAptArtifactsResponse. */ + interface IImportAptArtifactsResponse { - /** GetFileRequest name */ - name?: (string|null); + /** ImportAptArtifactsResponse aptArtifacts */ + aptArtifacts?: (google.devtools.artifactregistry.v1beta2.IAptArtifact[]|null); + + /** ImportAptArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]|null); } - /** Represents a GetFileRequest. */ - class GetFileRequest implements IGetFileRequest { + /** Represents an ImportAptArtifactsResponse. */ + class ImportAptArtifactsResponse implements IImportAptArtifactsResponse { /** - * Constructs a new GetFileRequest. + * Constructs a new ImportAptArtifactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse); - /** GetFileRequest name. */ - public name: string; + /** ImportAptArtifactsResponse aptArtifacts. */ + public aptArtifacts: google.devtools.artifactregistry.v1beta2.IAptArtifact[]; + + /** ImportAptArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo[]; /** - * Creates a new GetFileRequest instance using the specified properties. + * Creates a new ImportAptArtifactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetFileRequest instance + * @returns ImportAptArtifactsResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest): google.devtools.artifactregistry.v1beta2.GetFileRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; /** - * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. - * @param message GetFileRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. - * @param message GetFileRequest message or plain object to encode + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFileRequest 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 GetFileRequest + * @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.v1beta2.GetFileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; /** - * Decodes a GetFileRequest 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 GetFileRequest + * @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.v1beta2.GetFileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; /** - * Verifies a GetFileRequest 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 GetFileRequest 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 GetFileRequest + * @returns ImportAptArtifactsResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetFileRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse; /** - * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. - * @param message GetFileRequest + * 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.v1beta2.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFileRequest to JSON. + * Converts this ImportAptArtifactsResponse 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); + /** Properties of an ImportAptArtifactsMetadata. */ + interface IImportAptArtifactsMetadata { } - /** Represents a Package. */ - class Package implements IPackage { + /** Represents an ImportAptArtifactsMetadata. */ + class ImportAptArtifactsMetadata implements IImportAptArtifactsMetadata { /** - * Constructs a new Package. + * Constructs a new ImportAptArtifactsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.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); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata); /** - * Creates a new Package instance using the specified properties. + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Package instance + * @returns ImportAptArtifactsMetadata instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IPackage): google.devtools.artifactregistry.v1beta2.Package; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; /** - * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Package 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 Package + * @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.v1beta2.Package; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; /** - * Decodes a Package 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 Package + * @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.v1beta2.Package; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; /** - * Verifies a Package 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 Package 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 Package + * @returns ImportAptArtifactsMetadata */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Package; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata; /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @param message Package + * 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.v1beta2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Package to JSON. + * Converts this ImportAptArtifactsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPackagesRequest. */ - interface IListPackagesRequest { - - /** ListPackagesRequest parent */ - parent?: (string|null); + /** Properties of a Hash. */ + interface IHash { - /** ListPackagesRequest pageSize */ - pageSize?: (number|null); + /** Hash type */ + type?: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType|null); - /** ListPackagesRequest pageToken */ - pageToken?: (string|null); + /** Hash value */ + value?: (Uint8Array|string|null); } - /** Represents a ListPackagesRequest. */ - class ListPackagesRequest implements IListPackagesRequest { + /** Represents a Hash. */ + class Hash implements IHash { /** - * Constructs a new ListPackagesRequest. + * Constructs a new Hash. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest); - - /** ListPackagesRequest parent. */ - public parent: string; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IHash); - /** ListPackagesRequest pageSize. */ - public pageSize: number; + /** Hash type. */ + public type: (google.devtools.artifactregistry.v1beta2.Hash.HashType|keyof typeof google.devtools.artifactregistry.v1beta2.Hash.HashType); - /** ListPackagesRequest pageToken. */ - public pageToken: string; + /** Hash value. */ + public value: (Uint8Array|string); /** - * Creates a new ListPackagesRequest instance using the specified properties. + * Creates a new Hash instance using the specified properties. * @param [properties] Properties to set - * @returns ListPackagesRequest instance + * @returns Hash instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IHash): google.devtools.artifactregistry.v1beta2.Hash; /** - * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. - * @param message ListPackagesRequest message or plain object to encode + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. - * @param message ListPackagesRequest message or plain object to encode + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IHash, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. + * 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 ListPackagesRequest + * @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.v1beta2.ListPackagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Hash; /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * Decodes a Hash message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPackagesRequest + * @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.v1beta2.ListPackagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Hash; /** - * Verifies a ListPackagesRequest message. + * 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 ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Hash message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPackagesRequest + * @returns Hash */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Hash; /** - * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. - * @param message ListPackagesRequest + * 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.v1beta2.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPackagesRequest to JSON. + * Converts this Hash to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListPackagesResponse. */ - interface IListPackagesResponse { + namespace Hash { - /** ListPackagesResponse packages */ - packages?: (google.devtools.artifactregistry.v1beta2.IPackage[]|null); + /** HashType enum. */ + enum HashType { + HASH_TYPE_UNSPECIFIED = 0, + SHA256 = 1, + MD5 = 2 + } + } - /** ListPackagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a File. */ + interface IFile { + + /** File name */ + name?: (string|null); + + /** File sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** File hashes */ + hashes?: (google.devtools.artifactregistry.v1beta2.IHash[]|null); + + /** File createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** File updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** File owner */ + owner?: (string|null); } - /** Represents a ListPackagesResponse. */ - class ListPackagesResponse implements IListPackagesResponse { + /** Represents a File. */ + class File implements IFile { /** - * Constructs a new ListPackagesResponse. + * Constructs a new File. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IFile); - /** ListPackagesResponse packages. */ - public packages: google.devtools.artifactregistry.v1beta2.IPackage[]; + /** File name. */ + public name: string; - /** ListPackagesResponse nextPageToken. */ - public nextPageToken: string; + /** File sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** File hashes. */ + public hashes: google.devtools.artifactregistry.v1beta2.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 ListPackagesResponse instance using the specified properties. + * Creates a new File instance using the specified properties. * @param [properties] Properties to set - * @returns ListPackagesResponse instance + * @returns File instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IFile): google.devtools.artifactregistry.v1beta2.File; /** - * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. - * @param message ListPackagesResponse message or plain object to encode + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. - * @param message ListPackagesResponse message or plain object to encode + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. + * 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 ListPackagesResponse + * @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.v1beta2.ListPackagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.File; /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPackagesResponse + * @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.v1beta2.ListPackagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.File; /** - * Verifies a ListPackagesResponse message. + * 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 ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPackagesResponse + * @returns File */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.File; /** - * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. - * @param message ListPackagesResponse + * 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.v1beta2.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPackagesResponse to JSON. + * Converts this File to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetPackageRequest. */ - interface IGetPackageRequest { + /** Properties of a ListFilesRequest. */ + interface IListFilesRequest { - /** GetPackageRequest name */ - name?: (string|null); + /** ListFilesRequest parent */ + parent?: (string|null); + + /** ListFilesRequest filter */ + filter?: (string|null); + + /** ListFilesRequest pageSize */ + pageSize?: (number|null); + + /** ListFilesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetPackageRequest. */ - class GetPackageRequest implements IGetPackageRequest { + /** Represents a ListFilesRequest. */ + class ListFilesRequest implements IListFilesRequest { /** - * Constructs a new GetPackageRequest. + * Constructs a new ListFilesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesRequest); - /** GetPackageRequest name. */ - public name: string; + /** ListFilesRequest parent. */ + public parent: 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.v1beta2.IGetPackageRequest): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + /** ListFilesRequest filter. */ + public filter: string; - /** - * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. - * @param message GetPackageRequest message or plain object to encode + /** ListFilesRequest pageSize. */ + public pageSize: number; + + /** ListFilesRequest pageToken. */ + public pageToken: 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.v1beta2.IListFilesRequest): google.devtools.artifactregistry.v1beta2.ListFilesRequest; + + /** + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. - * @param message GetPackageRequest message or plain object to encode + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPackageRequest message from the specified reader or buffer. + * 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 GetPackageRequest + * @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.v1beta2.GetPackageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesRequest; /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPackageRequest + * @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.v1beta2.GetPackageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesRequest; /** - * Verifies a GetPackageRequest message. + * 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 GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPackageRequest + * @returns ListFilesRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetPackageRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesRequest; /** - * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. - * @param message GetPackageRequest + * 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.v1beta2.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPackageRequest to JSON. + * Converts this ListFilesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeletePackageRequest. */ - interface IDeletePackageRequest { + /** Properties of a ListFilesResponse. */ + interface IListFilesResponse { - /** DeletePackageRequest name */ - name?: (string|null); + /** ListFilesResponse files */ + files?: (google.devtools.artifactregistry.v1beta2.IFile[]|null); + + /** ListFilesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeletePackageRequest. */ - class DeletePackageRequest implements IDeletePackageRequest { + /** Represents a ListFilesResponse. */ + class ListFilesResponse implements IListFilesResponse { /** - * Constructs a new DeletePackageRequest. + * Constructs a new ListFilesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse); - /** DeletePackageRequest name. */ - public name: string; + /** ListFilesResponse files. */ + public files: google.devtools.artifactregistry.v1beta2.IFile[]; + + /** ListFilesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeletePackageRequest instance using the specified properties. + * Creates a new ListFilesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeletePackageRequest instance + * @returns ListFilesResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListFilesResponse): google.devtools.artifactregistry.v1beta2.ListFilesResponse; /** - * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. - * @param message DeletePackageRequest message or plain object to encode + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. - * @param message DeletePackageRequest message or plain object to encode + * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. + * 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 DeletePackageRequest + * @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.v1beta2.DeletePackageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListFilesResponse; /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePackageRequest + * @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.v1beta2.DeletePackageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListFilesResponse; /** - * Verifies a DeletePackageRequest message. + * 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 DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeletePackageRequest + * @returns ListFilesResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListFilesResponse; /** - * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. - * @param message DeletePackageRequest + * 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.v1beta2.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePackageRequest to JSON. + * Converts this ListFilesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Repository. */ - interface IRepository { + /** Properties of a GetFileRequest. */ + interface IGetFileRequest { - /** Repository name */ + /** GetFileRequest name */ name?: (string|null); - - /** Repository format */ - format?: (google.devtools.artifactregistry.v1beta2.Repository.Format|keyof typeof google.devtools.artifactregistry.v1beta2.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 { + /** Represents a GetFileRequest. */ + class GetFileRequest implements IGetFileRequest { /** - * Constructs a new Repository. + * Constructs a new GetFileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IRepository); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest); - /** Repository name. */ + /** GetFileRequest name. */ public name: string; - /** Repository format. */ - public format: (google.devtools.artifactregistry.v1beta2.Repository.Format|keyof typeof google.devtools.artifactregistry.v1beta2.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; - /** - * Creates a new Repository instance using the specified properties. + * Creates a new GetFileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Repository instance + * @returns GetFileRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IRepository): google.devtools.artifactregistry.v1beta2.Repository; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetFileRequest): google.devtools.artifactregistry.v1beta2.GetFileRequest; /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. - * @param message Repository message or plain object to encode + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetFileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Repository message from the specified reader or buffer. + * 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 Repository + * @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.v1beta2.Repository; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetFileRequest; /** - * Decodes a Repository message from the specified reader or buffer, length delimited. + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Repository + * @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.v1beta2.Repository; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetFileRequest; /** - * Verifies a Repository message. + * 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 Repository message from a plain object. Also converts values to their respective internal types. + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Repository + * @returns GetFileRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Repository; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetFileRequest; /** - * Creates a plain object from a Repository message. Also converts values to other types if specified. - * @param message Repository + * 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.v1beta2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetFileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Repository to JSON. + * Converts this GetFileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Repository { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - DOCKER = 1 - } - } + /** Properties of a Package. */ + interface IPackage { - /** Properties of a ListRepositoriesRequest. */ - interface IListRepositoriesRequest { + /** Package name */ + name?: (string|null); - /** ListRepositoriesRequest parent */ - parent?: (string|null); + /** Package displayName */ + displayName?: (string|null); - /** ListRepositoriesRequest pageSize */ - pageSize?: (number|null); + /** Package createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ListRepositoriesRequest pageToken */ - pageToken?: (string|null); + /** Package updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListRepositoriesRequest. */ - class ListRepositoriesRequest implements IListRepositoriesRequest { + /** Represents a Package. */ + class Package implements IPackage { /** - * Constructs a new ListRepositoriesRequest. + * Constructs a new Package. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IPackage); - /** ListRepositoriesRequest parent. */ - public parent: string; + /** Package name. */ + public name: string; - /** ListRepositoriesRequest pageSize. */ - public pageSize: number; + /** Package displayName. */ + public displayName: string; - /** ListRepositoriesRequest pageToken. */ - public pageToken: string; + /** Package createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Package updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListRepositoriesRequest instance using the specified properties. + * Creates a new Package instance using the specified properties. * @param [properties] Properties to set - * @returns ListRepositoriesRequest instance + * @returns Package instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest): google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IPackage): google.devtools.artifactregistry.v1beta2.Package; /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. - * @param message ListRepositoriesRequest message or plain object to encode + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * 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 ListRepositoriesRequest + * @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.v1beta2.ListRepositoriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Package; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a Package message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRepositoriesRequest + * @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.v1beta2.ListRepositoriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Package; /** - * Verifies a ListRepositoriesRequest message. + * 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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Package message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRepositoriesRequest + * @returns Package */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Package; /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. - * @param message ListRepositoriesRequest + * 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.v1beta2.ListRepositoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRepositoriesRequest to JSON. + * Converts this Package to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListRepositoriesResponse. */ - interface IListRepositoriesResponse { + /** Properties of a ListPackagesRequest. */ + interface IListPackagesRequest { - /** ListRepositoriesResponse repositories */ - repositories?: (google.devtools.artifactregistry.v1beta2.IRepository[]|null); + /** ListPackagesRequest parent */ + parent?: (string|null); - /** ListRepositoriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListPackagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPackagesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListRepositoriesResponse. */ - class ListRepositoriesResponse implements IListRepositoriesResponse { + /** Represents a ListPackagesRequest. */ + class ListPackagesRequest implements IListPackagesRequest { /** - * Constructs a new ListRepositoriesResponse. + * Constructs a new ListPackagesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest); - /** ListRepositoriesResponse repositories. */ - public repositories: google.devtools.artifactregistry.v1beta2.IRepository[]; + /** ListPackagesRequest parent. */ + public parent: string; - /** ListRepositoriesResponse nextPageToken. */ - public nextPageToken: string; + /** ListPackagesRequest pageSize. */ + public pageSize: number; + + /** ListPackagesRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListRepositoriesResponse instance using the specified properties. + * Creates a new ListPackagesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListRepositoriesResponse instance + * @returns ListPackagesRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse): google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesRequest): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. - * @param message ListRepositoriesResponse message or plain object to encode + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * 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 ListRepositoriesResponse + * @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.v1beta2.ListRepositoriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListRepositoriesResponse + * @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.v1beta2.ListRepositoriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; /** - * Verifies a ListRepositoriesResponse message. + * 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 ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListRepositoriesResponse + * @returns ListPackagesRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesRequest; /** - * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. - * @param message ListRepositoriesResponse + * 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.v1beta2.ListRepositoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListRepositoriesResponse to JSON. + * Converts this ListPackagesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetRepositoryRequest. */ - interface IGetRepositoryRequest { + /** Properties of a ListPackagesResponse. */ + interface IListPackagesResponse { - /** GetRepositoryRequest name */ - name?: (string|null); + /** ListPackagesResponse packages */ + packages?: (google.devtools.artifactregistry.v1beta2.IPackage[]|null); + + /** ListPackagesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetRepositoryRequest. */ - class GetRepositoryRequest implements IGetRepositoryRequest { + /** Represents a ListPackagesResponse. */ + class ListPackagesResponse implements IListPackagesResponse { /** - * Constructs a new GetRepositoryRequest. + * Constructs a new ListPackagesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse); - /** GetRepositoryRequest name. */ - public name: string; + /** ListPackagesResponse packages. */ + public packages: google.devtools.artifactregistry.v1beta2.IPackage[]; + + /** ListPackagesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetRepositoryRequest instance using the specified properties. + * Creates a new ListPackagesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetRepositoryRequest instance + * @returns ListPackagesResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest): google.devtools.artifactregistry.v1beta2.GetRepositoryRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListPackagesResponse): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. - * @param message GetRepositoryRequest message or plain object to encode + * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListPackagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * 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 GetRepositoryRequest + * @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.v1beta2.GetRepositoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetRepositoryRequest + * @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.v1beta2.GetRepositoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; /** - * Verifies a GetRepositoryRequest message. + * 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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetRepositoryRequest + * @returns ListPackagesResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListPackagesResponse; /** - * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. - * @param message GetRepositoryRequest + * 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.v1beta2.GetRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListPackagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetRepositoryRequest to JSON. + * Converts this ListPackagesResponse 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); + /** Properties of a GetPackageRequest. */ + interface IGetPackageRequest { - /** CreateRepositoryRequest repository */ - repository?: (google.devtools.artifactregistry.v1beta2.IRepository|null); + /** GetPackageRequest name */ + name?: (string|null); } - /** Represents a CreateRepositoryRequest. */ - class CreateRepositoryRequest implements ICreateRepositoryRequest { + /** Represents a GetPackageRequest. */ + class GetPackageRequest implements IGetPackageRequest { /** - * Constructs a new CreateRepositoryRequest. + * Constructs a new GetPackageRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest); - - /** CreateRepositoryRequest parent. */ - public parent: string; - - /** CreateRepositoryRequest repositoryId. */ - public repositoryId: string; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest); - /** CreateRepositoryRequest repository. */ - public repository?: (google.devtools.artifactregistry.v1beta2.IRepository|null); + /** GetPackageRequest name. */ + public name: string; /** - * Creates a new CreateRepositoryRequest instance using the specified properties. + * Creates a new GetPackageRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateRepositoryRequest instance + * @returns GetPackageRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest): google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetPackageRequest): google.devtools.artifactregistry.v1beta2.GetPackageRequest; /** - * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. - * @param message CreateRepositoryRequest message or plain object to encode + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. - * @param message CreateRepositoryRequest message or plain object to encode + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetPackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * 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 CreateRepositoryRequest + * @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.v1beta2.CreateRepositoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetPackageRequest; /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateRepositoryRequest + * @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.v1beta2.CreateRepositoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetPackageRequest; /** - * Verifies a CreateRepositoryRequest message. + * 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 CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateRepositoryRequest + * @returns GetPackageRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetPackageRequest; /** - * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. - * @param message CreateRepositoryRequest + * 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.v1beta2.CreateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetPackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateRepositoryRequest to JSON. + * Converts this GetPackageRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateRepositoryRequest. */ - interface IUpdateRepositoryRequest { - - /** UpdateRepositoryRequest repository */ - repository?: (google.devtools.artifactregistry.v1beta2.IRepository|null); + /** Properties of a DeletePackageRequest. */ + interface IDeletePackageRequest { - /** UpdateRepositoryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeletePackageRequest name */ + name?: (string|null); } - /** Represents an UpdateRepositoryRequest. */ - class UpdateRepositoryRequest implements IUpdateRepositoryRequest { + /** Represents a DeletePackageRequest. */ + class DeletePackageRequest implements IDeletePackageRequest { /** - * Constructs a new UpdateRepositoryRequest. + * Constructs a new DeletePackageRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest); - - /** UpdateRepositoryRequest repository. */ - public repository?: (google.devtools.artifactregistry.v1beta2.IRepository|null); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest); - /** UpdateRepositoryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeletePackageRequest name. */ + public name: string; /** - * Creates a new UpdateRepositoryRequest instance using the specified properties. + * Creates a new DeletePackageRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateRepositoryRequest instance + * @returns DeletePackageRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest): google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; /** - * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. - * @param message UpdateRepositoryRequest message or plain object to encode + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. - * @param message UpdateRepositoryRequest message or plain object to encode + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * 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 UpdateRepositoryRequest + * @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.v1beta2.UpdateRepositoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateRepositoryRequest + * @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.v1beta2.UpdateRepositoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; /** - * Verifies an UpdateRepositoryRequest message. + * 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 an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateRepositoryRequest + * @returns DeletePackageRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeletePackageRequest; /** - * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. - * @param message UpdateRepositoryRequest + * 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.v1beta2.UpdateRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeletePackageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateRepositoryRequest to JSON. + * Converts this DeletePackageRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteRepositoryRequest. */ - interface IDeleteRepositoryRequest { + /** Properties of a Repository. */ + interface IRepository { - /** DeleteRepositoryRequest name */ + /** Repository mavenConfig */ + mavenConfig?: (google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig|null); + + /** Repository name */ name?: (string|null); + + /** Repository format */ + format?: (google.devtools.artifactregistry.v1beta2.Repository.Format|keyof typeof google.devtools.artifactregistry.v1beta2.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 DeleteRepositoryRequest. */ - class DeleteRepositoryRequest implements IDeleteRepositoryRequest { + /** Represents a Repository. */ + class Repository implements IRepository { /** - * Constructs a new DeleteRepositoryRequest. + * Constructs a new Repository. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IRepository); - /** DeleteRepositoryRequest name. */ + /** Repository mavenConfig. */ + public mavenConfig?: (google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig|null); + + /** Repository name. */ public name: string; + /** Repository format. */ + public format: (google.devtools.artifactregistry.v1beta2.Repository.Format|keyof typeof google.devtools.artifactregistry.v1beta2.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 DeleteRepositoryRequest instance using the specified properties. + * Creates a new Repository instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteRepositoryRequest instance + * @returns Repository instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest): google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IRepository): google.devtools.artifactregistry.v1beta2.Repository; /** - * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. - * @param message DeleteRepositoryRequest message or plain object to encode + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. - * @param message DeleteRepositoryRequest message or plain object to encode + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IRepository, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * 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 DeleteRepositoryRequest + * @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.v1beta2.DeleteRepositoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Repository; /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a Repository message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteRepositoryRequest + * @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.v1beta2.DeleteRepositoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Repository; /** - * Verifies a DeleteRepositoryRequest message. + * 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 DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Repository message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteRepositoryRequest + * @returns Repository */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Repository; /** - * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. - * @param message DeleteRepositoryRequest + * 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.v1beta2.DeleteRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.Repository, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteRepositoryRequest to JSON. + * Converts this Repository to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an ArtifactRegistry */ - class ArtifactRegistry extends $protobuf.rpc.Service { + namespace Repository { - /** - * 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); + /** Properties of a MavenRepositoryConfig. */ + interface IMavenRepositoryConfig { - /** - * 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; + /** MavenRepositoryConfig allowSnapshotOverwrites */ + allowSnapshotOverwrites?: (boolean|null); - /** - * 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.v1beta2.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositoriesCallback): void; + /** MavenRepositoryConfig versionPolicy */ + versionPolicy?: (google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|null); + } - /** - * Calls ListRepositories. - * @param request ListRepositoriesRequest message or plain object - * @returns Promise - */ - public listRepositories(request: google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest): Promise; + /** Represents a MavenRepositoryConfig. */ + class MavenRepositoryConfig implements IMavenRepositoryConfig { + + /** + * Constructs a new MavenRepositoryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig); + + /** MavenRepositoryConfig allowSnapshotOverwrites. */ + public allowSnapshotOverwrites: boolean; + + /** MavenRepositoryConfig versionPolicy. */ + public versionPolicy: (google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|keyof typeof google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.IMavenRepositoryConfig): google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig; + + /** + * Encodes the specified MavenRepositoryConfig message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.IMavenRepositoryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenRepositoryConfig message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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.v1beta2.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepositoryCallback): void; + namespace MavenRepositoryConfig { - /** - * Calls GetRepository. - * @param request GetRepositoryRequest message or plain object - * @returns Promise - */ - public getRepository(request: google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest): Promise; + /** VersionPolicy enum. */ + enum VersionPolicy { + VERSION_POLICY_UNSPECIFIED = 0, + RELEASE = 1, + SNAPSHOT = 2 + } + } - /** - * Calls CreateRepository. + /** 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.v1beta2.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.v1beta2.IListRepositoriesRequest): google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest; + + /** + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IListRepositoriesResponse); + + /** ListRepositoriesResponse repositories. */ + public repositories: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesResponse): google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse; + + /** + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IGetRepositoryRequest): google.devtools.artifactregistry.v1beta2.GetRepositoryRequest; + + /** + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IRepository|null); + } + + /** Represents a CreateRepositoryRequest. */ + class CreateRepositoryRequest implements ICreateRepositoryRequest { + + /** + * Constructs a new CreateRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest); + + /** CreateRepositoryRequest parent. */ + public parent: string; + + /** CreateRepositoryRequest repositoryId. */ + public repositoryId: string; + + /** CreateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateRepositoryRequest): google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest; + + /** + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IUpdateRepositoryRequest); + + /** UpdateRepositoryRequest repository. */ + public repository?: (google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateRepositoryRequest): google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest; + + /** + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IDeleteRepositoryRequest): google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest; + + /** + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteRepositoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 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.v1beta2.IImportAptArtifactsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifactsCallback): void; + + /** + * Calls ImportAptArtifacts. + * @param request ImportAptArtifactsRequest message or plain object + * @returns Promise + */ + public importAptArtifacts(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IImportYumArtifactsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifactsCallback): void; + + /** + * Calls ImportYumArtifacts. + * @param request ImportYumArtifactsRequest message or plain object + * @returns Promise + */ + public importYumArtifacts(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListRepositoriesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositoriesCallback): void; + + /** + * Calls ListRepositories. + * @param request ListRepositoriesRequest message or plain object + * @returns Promise + */ + public listRepositories(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepositoryCallback): void; + + /** + * Calls GetRepository. + * @param request GetRepositoryRequest message or plain object + * @returns Promise + */ + public getRepository(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepositoryCallback): void; + + /** + * Calls CreateRepository. * @param request CreateRepositoryRequest message or plain object + * @returns Promise + */ + public createRepository(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepositoryCallback): void; + + /** + * Calls UpdateRepository. + * @param request UpdateRepositoryRequest message or plain object + * @returns Promise + */ + public updateRepository(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepositoryCallback): void; + + /** + * Calls DeleteRepository. + * @param request DeleteRepositoryRequest message or plain object + * @returns Promise + */ + public deleteRepository(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListPackagesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackagesCallback): void; + + /** + * Calls ListPackages. + * @param request ListPackagesRequest message or plain object + * @returns Promise + */ + public listPackages(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetPackageRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackageCallback): void; + + /** + * Calls GetPackage. + * @param request GetPackageRequest message or plain object + * @returns Promise + */ + public getPackage(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeletePackageRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackageCallback): void; + + /** + * Calls DeletePackage. + * @param request DeletePackageRequest message or plain object + * @returns Promise + */ + public deletePackage(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListVersionsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersionsCallback): void; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise + */ + public listVersions(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetVersionRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersionCallback): void; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise + */ + public getVersion(request: google.devtools.artifactregistry.v1beta2.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 createRepository(request: google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepositoryCallback): void; + public deleteVersion(request: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersionCallback): void; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise + */ + public deleteVersion(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListFilesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFilesCallback): void; + + /** + * Calls ListFiles. + * @param request ListFilesRequest message or plain object + * @returns Promise + */ + public listFiles(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetFileRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFileCallback): void; + + /** + * Calls GetFile. + * @param request GetFileRequest message or plain object + * @returns Promise + */ + public getFile(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IListTagsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTagsCallback): void; + + /** + * Calls ListTags. + * @param request ListTagsRequest message or plain object + * @returns Promise + */ + public listTags(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTagCallback): void; + + /** + * Calls GetTag. + * @param request GetTagRequest message or plain object + * @returns Promise + */ + public getTag(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTagCallback): void; + + /** + * Calls CreateTag. + * @param request CreateTagRequest message or plain object + * @returns Promise + */ + public createTag(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTagCallback): void; + + /** + * Calls UpdateTag. + * @param request UpdateTagRequest message or plain object + * @returns Promise + */ + public updateTag(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTagCallback): void; + + /** + * Calls DeleteTag. + * @param request DeleteTagRequest message or plain object + * @returns Promise + */ + public deleteTag(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IGetProjectSettingsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettingsCallback): void; + + /** + * Calls GetProjectSettings. + * @param request GetProjectSettingsRequest message or plain object + * @returns Promise + */ + public getProjectSettings(request: google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateProjectSettingsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettingsCallback): void; + + /** + * Calls UpdateProjectSettings. + * @param request UpdateProjectSettingsRequest message or plain object + * @returns Promise + */ + public updateProjectSettings(request: google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest): Promise; + } + + namespace ArtifactRegistry { + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistry#listRepositories}. + * @param error Error, if any + * @param [response] ListRepositoriesResponse + */ + type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry#updateRepository}. + * @param error Error, if any + * @param [response] Repository + */ + type UpdateRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Repository) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry#listPackages}. + * @param error Error, if any + * @param [response] ListPackagesResponse + */ + type ListPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListPackagesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getPackage}. + * @param error Error, if any + * @param [response] Package + */ + type GetPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Package) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry#listVersions}. + * @param error Error, if any + * @param [response] ListVersionsResponse + */ + type ListVersionsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListVersionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getVersion}. + * @param error Error, if any + * @param [response] Version + */ + type GetVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Version) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry#listFiles}. + * @param error Error, if any + * @param [response] ListFilesResponse + */ + type ListFilesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListFilesResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getFile}. + * @param error Error, if any + * @param [response] File + */ + type GetFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.File) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listTags}. + * @param error Error, if any + * @param [response] ListTagsResponse + */ + type ListTagsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListTagsResponse) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getTag}. + * @param error Error, if any + * @param [response] Tag + */ + type GetTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createTag}. + * @param error Error, if any + * @param [response] Tag + */ + type CreateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateTag}. + * @param error Error, if any + * @param [response] Tag + */ + type UpdateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistry#getProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type GetProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ProjectSettings) => void; + + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateProjectSettings}. + * @param error Error, if any + * @param [response] ProjectSettings + */ + type UpdateProjectSettingsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.IOperationMetadata): google.devtools.artifactregistry.v1beta2.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.OperationMetadata; /** - * Calls CreateRepository. - * @param request CreateRepositoryRequest message or plain object - * @returns Promise + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createRepository(request: google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateRepository. - * @param request UpdateRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Repository + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata */ - public updateRepository(request: google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepositoryCallback): void; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.OperationMetadata; /** - * Calls UpdateRepository. - * @param request UpdateRepositoryRequest message or plain object - * @returns Promise + * 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 updateRepository(request: google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest): Promise; + public static toObject(message: google.devtools.artifactregistry.v1beta2.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteRepository. - * @param request DeleteRepositoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this OperationMetadata to JSON. + * @returns JSON object */ - public deleteRepository(request: google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepositoryCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProjectSettings. */ + interface IProjectSettings { + + /** ProjectSettings name */ + name?: (string|null); + + /** ProjectSettings legacyRedirectionState */ + legacyRedirectionState?: (google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|null); + } + + /** Represents a ProjectSettings. */ + class ProjectSettings implements IProjectSettings { /** - * Calls DeleteRepository. - * @param request DeleteRepositoryRequest message or plain object - * @returns Promise + * Constructs a new ProjectSettings. + * @param [properties] Properties to set */ - public deleteRepository(request: google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest): Promise; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IProjectSettings); + + /** ProjectSettings name. */ + public name: string; + + /** ProjectSettings legacyRedirectionState. */ + public legacyRedirectionState: (google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|keyof typeof google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState); /** - * Calls ListPackages. - * @param request ListPackagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPackagesResponse + * Creates a new ProjectSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectSettings instance */ - public listPackages(request: google.devtools.artifactregistry.v1beta2.IListPackagesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackagesCallback): void; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IProjectSettings): google.devtools.artifactregistry.v1beta2.ProjectSettings; /** - * Calls ListPackages. - * @param request ListPackagesRequest message or plain object - * @returns Promise + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPackages(request: google.devtools.artifactregistry.v1beta2.IListPackagesRequest): Promise; + public static encode(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPackage. - * @param request GetPackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Package + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. + * @param message ProjectSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPackage(request: google.devtools.artifactregistry.v1beta2.IGetPackageRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackageCallback): void; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IProjectSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPackage. - * @param request GetPackageRequest message or plain object - * @returns Promise + * 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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IGetProjectSettingsRequest): google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest; + + /** + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.IUpdateProjectSettingsRequest); + + /** UpdateProjectSettingsRequest projectSettings. */ + public projectSettings?: (google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateProjectSettingsRequest): google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest; + + /** + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateProjectSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 getPackage(request: google.devtools.artifactregistry.v1beta2.IGetPackageRequest): Promise; + public static create(properties?: google.devtools.artifactregistry.v1beta2.ITag): google.devtools.artifactregistry.v1beta2.Tag; /** - * Calls DeletePackage. - * @param request DeletePackageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deletePackage(request: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackageCallback): void; + public static encode(message: google.devtools.artifactregistry.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeletePackage. - * @param request DeletePackageRequest message or plain object - * @returns Promise + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deletePackage(request: google.devtools.artifactregistry.v1beta2.IDeletePackageRequest): Promise; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + * 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 listVersions(request: google.devtools.artifactregistry.v1beta2.IListVersionsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersionsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Tag; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @returns Promise + * 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 listVersions(request: google.devtools.artifactregistry.v1beta2.IListVersionsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Tag; /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version + * Verifies a Tag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getVersion(request: google.devtools.artifactregistry.v1beta2.IGetVersionRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersionCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @returns Promise + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag */ - public getVersion(request: google.devtools.artifactregistry.v1beta2.IGetVersionRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Tag; /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * 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 deleteVersion(request: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersionCallback): void; + public static toObject(message: google.devtools.artifactregistry.v1beta2.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @returns Promise + * Converts this Tag to JSON. + * @returns JSON object */ - public deleteVersion(request: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest): Promise; + 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 { /** - * Calls ListFiles. - * @param request ListFilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFilesResponse + * Constructs a new ListTagsRequest. + * @param [properties] Properties to set */ - public listFiles(request: google.devtools.artifactregistry.v1beta2.IListFilesRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFilesCallback): void; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest); + + /** ListTagsRequest parent. */ + public parent: string; + + /** ListTagsRequest filter. */ + public filter: string; + + /** ListTagsRequest pageSize. */ + public pageSize: number; + + /** ListTagsRequest pageToken. */ + public pageToken: string; /** - * Calls ListFiles. - * @param request ListFilesRequest message or plain object - * @returns Promise + * Creates a new ListTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsRequest instance */ - public listFiles(request: google.devtools.artifactregistry.v1beta2.IListFilesRequest): Promise; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest): google.devtools.artifactregistry.v1beta2.ListTagsRequest; /** - * Calls GetFile. - * @param request GetFileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and File + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getFile(request: google.devtools.artifactregistry.v1beta2.IGetFileRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFileCallback): void; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetFile. - * @param request GetFileRequest message or plain object - * @returns Promise + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * @param message ListTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getFile(request: google.devtools.artifactregistry.v1beta2.IGetFileRequest): Promise; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTagsResponse + * 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 listTags(request: google.devtools.artifactregistry.v1beta2.IListTagsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTagsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsRequest; /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @returns Promise + * 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 listTags(request: google.devtools.artifactregistry.v1beta2.IListTagsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsRequest; /** - * Calls GetTag. - * @param request GetTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag + * Verifies a ListTagsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getTag(request: google.devtools.artifactregistry.v1beta2.IGetTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTagCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetTag. - * @param request GetTagRequest message or plain object - * @returns Promise + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsRequest */ - public getTag(request: google.devtools.artifactregistry.v1beta2.IGetTagRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsRequest; /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag + * 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 createTag(request: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTagCallback): void; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @returns Promise + * Converts this ListTagsRequest to JSON. + * @returns JSON object */ - public createTag(request: google.devtools.artifactregistry.v1beta2.ICreateTagRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTagsResponse. */ + interface IListTagsResponse { + + /** ListTagsResponse tags */ + tags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); + + /** ListTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTagsResponse. */ + class ListTagsResponse implements IListTagsResponse { /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag + * Constructs a new ListTagsResponse. + * @param [properties] Properties to set */ - public updateTag(request: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTagCallback): void; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse); + + /** ListTagsResponse tags. */ + public tags: google.devtools.artifactregistry.v1beta2.ITag[]; + + /** ListTagsResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @returns Promise + * Creates a new ListTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagsResponse instance */ - public updateTag(request: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest): Promise; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse): google.devtools.artifactregistry.v1beta2.ListTagsResponse; /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteTag(request: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTagCallback): void; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @returns Promise + * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. + * @param message ListTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteTag(request: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest): Promise; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * 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 setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicyCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListTagsResponse; /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise + * 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 setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListTagsResponse; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Verifies a ListTagsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicyCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagsResponse */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsResponse; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * 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 testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissionsCallback): void; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise + * Converts this ListTagsResponse to JSON. + * @returns JSON object */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace ArtifactRegistry { + /** Properties of a GetTagRequest. */ + interface IGetTagRequest { - /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listRepositories}. - * @param error Error, if any - * @param [response] ListRepositoriesResponse - */ - type ListRepositoriesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse) => void; + /** GetTagRequest name */ + name?: (string|null); + } + + /** Represents a GetTagRequest. */ + class GetTagRequest implements IGetTagRequest { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getRepository}. - * @param error Error, if any - * @param [response] Repository + * Constructs a new GetTagRequest. + * @param [properties] Properties to set */ - type GetRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Repository) => void; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest); + + /** GetTagRequest name. */ + public name: string; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createRepository}. - * @param error Error, if any - * @param [response] Operation + * Creates a new GetTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTagRequest instance */ - type CreateRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest): google.devtools.artifactregistry.v1beta2.GetTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateRepository}. - * @param error Error, if any - * @param [response] Repository + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateRepositoryCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Repository) => void; + public static encode(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteRepository}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. + * @param message GetTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteRepositoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listPackages}. - * @param error Error, if any - * @param [response] ListPackagesResponse + * 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 */ - type ListPackagesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListPackagesResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getPackage}. - * @param error Error, if any - * @param [response] Package + * 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 */ - type GetPackageCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Package) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deletePackage}. - * @param error Error, if any - * @param [response] Operation + * Verifies a GetTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeletePackageCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listVersions}. - * @param error Error, if any - * @param [response] ListVersionsResponse + * Creates a GetTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTagRequest */ - type ListVersionsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListVersionsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getVersion}. - * @param error Error, if any - * @param [response] Version + * 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 */ - type GetVersionCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Version) => void; + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteVersion}. - * @param error Error, if any - * @param [response] Operation + * Converts this GetTagRequest to JSON. + * @returns JSON object */ - type DeleteVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + 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.v1beta2.ITag|null); + } + + /** Represents a CreateTagRequest. */ + class CreateTagRequest implements ICreateTagRequest { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listFiles}. - * @param error Error, if any - * @param [response] ListFilesResponse + * Constructs a new CreateTagRequest. + * @param [properties] Properties to set */ - type ListFilesCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListFilesResponse) => void; + constructor(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest); + + /** CreateTagRequest parent. */ + public parent: string; + + /** CreateTagRequest tagId. */ + public tagId: string; + + /** CreateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getFile}. - * @param error Error, if any - * @param [response] File + * Creates a new CreateTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagRequest instance */ - type GetFileCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.File) => void; + public static create(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest): google.devtools.artifactregistry.v1beta2.CreateTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listTags}. - * @param error Error, if any - * @param [response] ListTagsResponse + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListTagsCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.ListTagsResponse) => void; + public static encode(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getTag}. - * @param error Error, if any - * @param [response] Tag + * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. + * @param message CreateTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createTag}. - * @param error Error, if any - * @param [response] Tag + * 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 */ - type CreateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.CreateTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateTag}. - * @param error Error, if any - * @param [response] Tag + * 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 */ - type UpdateTagCallback = (error: (Error|null), response?: google.devtools.artifactregistry.v1beta2.Tag) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.CreateTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteTag}. - * @param error Error, if any - * @param [response] Empty + * Verifies a CreateTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagRequest */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.CreateTagRequest; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * 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 */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static toObject(message: google.devtools.artifactregistry.v1beta2.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Converts this CreateTagRequest to JSON. + * @returns JSON object */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { + /** Properties of an UpdateTagRequest. */ + interface IUpdateTagRequest { + + /** UpdateTagRequest tag */ + tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + + /** UpdateTagRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents an UpdateTagRequest. */ + class UpdateTagRequest implements IUpdateTagRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new UpdateTagRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IOperationMetadata); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest); + + /** UpdateTagRequest tag. */ + public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + + /** UpdateTagRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new UpdateTagRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns UpdateTagRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IOperationMetadata): google.devtools.artifactregistry.v1beta2.OperationMetadata; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * 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 OperationMetadata + * @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.v1beta2.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @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.v1beta2.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; /** - * Verifies an OperationMetadata message. + * 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns UpdateTagRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * 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.v1beta2.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this UpdateTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Tag. */ - interface ITag { + /** Properties of a DeleteTagRequest. */ + interface IDeleteTagRequest { - /** Tag name */ + /** DeleteTagRequest name */ name?: (string|null); - - /** Tag version */ - version?: (string|null); } - /** Represents a Tag. */ - class Tag implements ITag { + /** Represents a DeleteTagRequest. */ + class DeleteTagRequest implements IDeleteTagRequest { /** - * Constructs a new Tag. + * Constructs a new DeleteTagRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.ITag); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest); - /** Tag name. */ + /** DeleteTagRequest name. */ public name: string; - /** Tag version. */ - public version: string; - /** - * Creates a new Tag instance using the specified properties. + * Creates a new DeleteTagRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Tag instance + * @returns DeleteTagRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.ITag): google.devtools.artifactregistry.v1beta2.Tag; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; /** - * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode + * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Tag message from the specified reader or buffer. + * 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 Tag + * @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.v1beta2.Tag; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; /** - * Decodes a Tag message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Tag + * @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.v1beta2.Tag; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; /** - * Verifies a Tag message. + * 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 Tag message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Tag + * @returns DeleteTagRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Tag; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag + * 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.v1beta2.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Tag to JSON. + * Converts this DeleteTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { + /** VersionView enum. */ + enum VersionView { + VERSION_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } - /** ListTagsRequest parent */ - parent?: (string|null); + /** Properties of a Version. */ + interface IVersion { - /** ListTagsRequest filter */ - filter?: (string|null); + /** Version name */ + name?: (string|null); - /** ListTagsRequest pageSize */ - pageSize?: (number|null); + /** Version description */ + description?: (string|null); - /** ListTagsRequest pageToken */ - pageToken?: (string|null); + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Version updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags */ + relatedTags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); + + /** Version metadata */ + metadata?: (google.protobuf.IStruct|null); } - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { + /** Represents a Version. */ + class Version implements IVersion { /** - * Constructs a new ListTagsRequest. + * Constructs a new Version. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IVersion); - /** ListTagsRequest parent. */ - public parent: string; + /** Version name. */ + public name: string; - /** ListTagsRequest filter. */ - public filter: string; + /** Version description. */ + public description: string; - /** ListTagsRequest pageSize. */ - public pageSize: number; + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ListTagsRequest pageToken. */ - public pageToken: string; + /** Version updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Version relatedTags. */ + public relatedTags: google.devtools.artifactregistry.v1beta2.ITag[]; + + /** Version metadata. */ + public metadata?: (google.protobuf.IStruct|null); /** - * Creates a new ListTagsRequest instance using the specified properties. + * Creates a new Version instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagsRequest instance + * @returns Version instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsRequest): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IVersion): google.devtools.artifactregistry.v1beta2.Version; /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagsRequest message from the specified reader or buffer. + * 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 ListTagsRequest + * @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.v1beta2.ListTagsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.Version; /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagsRequest + * @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.v1beta2.ListTagsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.Version; /** - * Verifies a ListTagsRequest message. + * 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 ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagsRequest + * @returns Version */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Version; /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest + * 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.v1beta2.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagsRequest to JSON. + * Converts this Version to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTagsResponse. */ - interface IListTagsResponse { + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { + + /** ListVersionsRequest parent */ + parent?: (string|null); + + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); - /** ListTagsResponse tags */ - tags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); + /** ListVersionsRequest view */ + view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); - /** ListTagsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListVersionsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a ListTagsResponse. */ - class ListTagsResponse implements IListTagsResponse { + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { /** - * Constructs a new ListTagsResponse. + * Constructs a new ListVersionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest); - /** ListTagsResponse tags. */ - public tags: google.devtools.artifactregistry.v1beta2.ITag[]; + /** ListVersionsRequest parent. */ + public parent: string; - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; + /** ListVersionsRequest pageSize. */ + public pageSize: number; + + /** ListVersionsRequest pageToken. */ + public pageToken: string; + + /** ListVersionsRequest view. */ + public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); + + /** ListVersionsRequest orderBy. */ + public orderBy: string; /** - * Creates a new ListTagsResponse instance using the specified properties. + * Creates a new ListVersionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagsResponse instance + * @returns ListVersionsRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListTagsResponse): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagsResponse message from the specified reader or buffer. + * 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 ListTagsResponse + * @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.v1beta2.ListTagsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagsResponse + * @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.v1beta2.ListTagsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; /** - * Verifies a ListTagsResponse message. + * 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 ListTagsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagsResponse + * @returns ListVersionsRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListTagsResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse + * 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.v1beta2.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagsResponse to JSON. + * Converts this ListVersionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTagRequest. */ - interface IGetTagRequest { + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { - /** GetTagRequest name */ - name?: (string|null); + /** ListVersionsResponse versions */ + versions?: (google.devtools.artifactregistry.v1beta2.IVersion[]|null); + + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetTagRequest. */ - class GetTagRequest implements IGetTagRequest { + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { /** - * Constructs a new GetTagRequest. + * Constructs a new ListVersionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse); - /** GetTagRequest name. */ - public name: string; + /** ListVersionsResponse versions. */ + public versions: google.devtools.artifactregistry.v1beta2.IVersion[]; + + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetTagRequest instance using the specified properties. + * Creates a new ListVersionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetTagRequest instance + * @returns ListVersionsResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetTagRequest): google.devtools.artifactregistry.v1beta2.GetTagRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; /** - * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. - * @param message GetTagRequest message or plain object to encode + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. - * @param message GetTagRequest message or plain object to encode + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTagRequest message from the specified reader or buffer. + * 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 GetTagRequest + * @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.v1beta2.GetTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; /** - * Decodes a GetTagRequest message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTagRequest + * @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.v1beta2.GetTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; /** - * Verifies a GetTagRequest message. + * 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 GetTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTagRequest + * @returns ListVersionsResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetTagRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; /** - * Creates a plain object from a GetTagRequest message. Also converts values to other types if specified. - * @param message GetTagRequest + * 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.v1beta2.GetTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTagRequest to JSON. + * Converts this ListVersionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTagRequest. */ - interface ICreateTagRequest { - - /** CreateTagRequest parent */ - parent?: (string|null); + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { - /** CreateTagRequest tagId */ - tagId?: (string|null); + /** GetVersionRequest name */ + name?: (string|null); - /** CreateTagRequest tag */ - tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + /** GetVersionRequest view */ + view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); } - /** Represents a CreateTagRequest. */ - class CreateTagRequest implements ICreateTagRequest { + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { /** - * Constructs a new CreateTagRequest. + * Constructs a new GetVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest); - - /** CreateTagRequest parent. */ - public parent: string; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest); - /** CreateTagRequest tagId. */ - public tagId: string; + /** GetVersionRequest name. */ + public name: string; - /** CreateTagRequest tag. */ - public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + /** GetVersionRequest view. */ + public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); /** - * Creates a new CreateTagRequest instance using the specified properties. + * Creates a new GetVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTagRequest instance + * @returns GetVersionRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.ICreateTagRequest): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest): google.devtools.artifactregistry.v1beta2.GetVersionRequest; /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTagRequest message from the specified reader or buffer. + * 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 CreateTagRequest + * @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.v1beta2.CreateTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.GetVersionRequest; /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTagRequest + * @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.v1beta2.CreateTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.GetVersionRequest; /** - * Verifies a CreateTagRequest message. + * 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 CreateTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTagRequest + * @returns GetVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.CreateTagRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetVersionRequest; /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest + * 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.v1beta2.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTagRequest to JSON. + * Converts this GetVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { - /** UpdateTagRequest tag */ - tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + /** DeleteVersionRequest name */ + name?: (string|null); - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteVersionRequest force */ + force?: (boolean|null); } - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { /** - * Constructs a new UpdateTagRequest. + * Constructs a new DeleteVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest); - /** UpdateTagRequest tag. */ - public tag?: (google.devtools.artifactregistry.v1beta2.ITag|null); + /** DeleteVersionRequest name. */ + public name: string; - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteVersionRequest force. */ + public force: boolean; /** - * Creates a new UpdateTagRequest instance using the specified properties. + * Creates a new DeleteVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTagRequest instance + * @returns DeleteVersionRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IUpdateTagRequest): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. + * 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 UpdateTagRequest + * @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.v1beta2.UpdateTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest + * @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.v1beta2.UpdateTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; /** - * Verifies an UpdateTagRequest message. + * 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 an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTagRequest + * @returns DeleteVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.UpdateTagRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest + * 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.v1beta2.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTagRequest to JSON. + * Converts this DeleteVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { + /** Properties of a YumArtifact. */ + interface IYumArtifact { - /** DeleteTagRequest name */ + /** YumArtifact name */ name?: (string|null); + + /** YumArtifact packageName */ + packageName?: (string|null); + + /** YumArtifact packageType */ + packageType?: (google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType|null); + + /** YumArtifact architecture */ + architecture?: (string|null); } - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { + /** Represents a YumArtifact. */ + class YumArtifact implements IYumArtifact { /** - * Constructs a new DeleteTagRequest. + * Constructs a new YumArtifact. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact); - /** DeleteTagRequest name. */ + /** YumArtifact name. */ public name: string; + /** YumArtifact packageName. */ + public packageName: string; + + /** YumArtifact packageType. */ + public packageType: (google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType|keyof typeof google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType); + + /** YumArtifact architecture. */ + public architecture: string; + /** - * Creates a new DeleteTagRequest instance using the specified properties. + * Creates a new YumArtifact instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTagRequest instance + * @returns YumArtifact instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteTagRequest): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IYumArtifact): google.devtools.artifactregistry.v1beta2.YumArtifact; /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode + * Encodes the specified YumArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IYumArtifact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. + * 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 DeleteTagRequest + * @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.v1beta2.DeleteTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.YumArtifact; /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a YumArtifact message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest + * @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.v1beta2.DeleteTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.YumArtifact; /** - * Verifies a DeleteTagRequest message. + * 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 DeleteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a YumArtifact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTagRequest + * @returns YumArtifact */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteTagRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.YumArtifact; /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest + * 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.v1beta2.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.YumArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTagRequest to JSON. + * Converts this YumArtifact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Version. */ - interface IVersion { - - /** Version name */ - name?: (string|null); + namespace YumArtifact { - /** Version description */ - description?: (string|null); + /** PackageType enum. */ + enum PackageType { + PACKAGE_TYPE_UNSPECIFIED = 0, + BINARY = 1, + SOURCE = 2 + } + } - /** Version createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an ImportYumArtifactsGcsSource. */ + interface IImportYumArtifactsGcsSource { - /** Version updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ImportYumArtifactsGcsSource uris */ + uris?: (string[]|null); - /** Version relatedTags */ - relatedTags?: (google.devtools.artifactregistry.v1beta2.ITag[]|null); + /** ImportYumArtifactsGcsSource useWildcards */ + useWildcards?: (boolean|null); } - /** Represents a Version. */ - class Version implements IVersion { + /** Represents an ImportYumArtifactsGcsSource. */ + class ImportYumArtifactsGcsSource implements IImportYumArtifactsGcsSource { /** - * Constructs a new Version. + * Constructs a new ImportYumArtifactsGcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IVersion); - - /** Version name. */ - public name: string; - - /** Version description. */ - public description: string; - - /** Version createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource); - /** Version updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportYumArtifactsGcsSource uris. */ + public uris: string[]; - /** Version relatedTags. */ - public relatedTags: google.devtools.artifactregistry.v1beta2.ITag[]; + /** ImportYumArtifactsGcsSource useWildcards. */ + public useWildcards: boolean; /** - * Creates a new Version instance using the specified properties. + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns Version instance + * @returns ImportYumArtifactsGcsSource instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IVersion): google.devtools.artifactregistry.v1beta2.Version; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; /** - * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * Encodes the specified ImportYumArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Version message from the specified reader or buffer. + * 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 Version + * @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.v1beta2.Version; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes an ImportYumArtifactsGcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Version + * @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.v1beta2.Version; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; /** - * Verifies a Version message. + * 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 a Version message from a plain object. Also converts values to their respective internal types. + * Creates an ImportYumArtifactsGcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Version + * @returns ImportYumArtifactsGcsSource */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.Version; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version + * 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.v1beta2.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Version to JSON. + * Converts this ImportYumArtifactsGcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** VersionView enum. */ - enum VersionView { - VERSION_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } + /** Properties of an ImportYumArtifactsRequest. */ + interface IImportYumArtifactsRequest { - /** Properties of a ListVersionsRequest. */ - interface IListVersionsRequest { + /** ImportYumArtifactsRequest gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - /** ListVersionsRequest parent */ + /** ImportYumArtifactsRequest parent */ parent?: (string|null); - - /** ListVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListVersionsRequest view */ - view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); } - /** Represents a ListVersionsRequest. */ - class ListVersionsRequest implements IListVersionsRequest { + /** Represents an ImportYumArtifactsRequest. */ + class ImportYumArtifactsRequest implements IImportYumArtifactsRequest { /** - * Constructs a new ListVersionsRequest. + * Constructs a new ImportYumArtifactsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest); - - /** ListVersionsRequest parent. */ - public parent: string; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest); - /** ListVersionsRequest pageSize. */ - public pageSize: number; + /** ImportYumArtifactsRequest gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - /** ListVersionsRequest pageToken. */ - public pageToken: string; + /** ImportYumArtifactsRequest parent. */ + public parent: string; - /** ListVersionsRequest view. */ - public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); + /** ImportYumArtifactsRequest source. */ + public source?: "gcsSource"; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ImportYumArtifactsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsRequest instance + * @returns ImportYumArtifactsRequest instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsRequest): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * 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 ListVersionsRequest + * @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.v1beta2.ListVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportYumArtifactsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsRequest + * @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.v1beta2.ListVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; /** - * Verifies a ListVersionsRequest message. + * 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 a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportYumArtifactsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsRequest + * @returns ImportYumArtifactsRequest */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest; /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @param message ListVersionsRequest + * 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.v1beta2.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ImportYumArtifactsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListVersionsResponse. */ - interface IListVersionsResponse { + /** Properties of an ImportYumArtifactsErrorInfo. */ + interface IImportYumArtifactsErrorInfo { - /** ListVersionsResponse versions */ - versions?: (google.devtools.artifactregistry.v1beta2.IVersion[]|null); + /** ImportYumArtifactsErrorInfo gcsSource */ + gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - /** ListVersionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ImportYumArtifactsErrorInfo error */ + error?: (google.rpc.IStatus|null); } - /** Represents a ListVersionsResponse. */ - class ListVersionsResponse implements IListVersionsResponse { + /** Represents an ImportYumArtifactsErrorInfo. */ + class ImportYumArtifactsErrorInfo implements IImportYumArtifactsErrorInfo { /** - * Constructs a new ListVersionsResponse. + * Constructs a new ImportYumArtifactsErrorInfo. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo); - /** ListVersionsResponse versions. */ - public versions: google.devtools.artifactregistry.v1beta2.IVersion[]; + /** ImportYumArtifactsErrorInfo gcsSource. */ + public gcsSource?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null); - /** ListVersionsResponse nextPageToken. */ - public nextPageToken: string; + /** ImportYumArtifactsErrorInfo error. */ + public error?: (google.rpc.IStatus|null); + + /** ImportYumArtifactsErrorInfo source. */ + public source?: "gcsSource"; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new ImportYumArtifactsErrorInfo instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsResponse instance + * @returns ImportYumArtifactsErrorInfo instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IListVersionsResponse): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * Encodes the specified ImportYumArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * 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 ListVersionsResponse + * @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.v1beta2.ListVersionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportYumArtifactsErrorInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsResponse + * @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.v1beta2.ListVersionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; /** - * Verifies a ListVersionsResponse message. + * 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 a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportYumArtifactsErrorInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsResponse + * @returns ImportYumArtifactsErrorInfo */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ListVersionsResponse; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @param message ListVersionsResponse + * 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.v1beta2.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this ImportYumArtifactsErrorInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetVersionRequest. */ - interface IGetVersionRequest { + /** Properties of an ImportYumArtifactsResponse. */ + interface IImportYumArtifactsResponse { - /** GetVersionRequest name */ - name?: (string|null); + /** ImportYumArtifactsResponse yumArtifacts */ + yumArtifacts?: (google.devtools.artifactregistry.v1beta2.IYumArtifact[]|null); - /** GetVersionRequest view */ - view?: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView|null); + /** ImportYumArtifactsResponse errors */ + errors?: (google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]|null); } - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { + /** Represents an ImportYumArtifactsResponse. */ + class ImportYumArtifactsResponse implements IImportYumArtifactsResponse { /** - * Constructs a new GetVersionRequest. + * Constructs a new ImportYumArtifactsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest); + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse); - /** GetVersionRequest name. */ - public name: string; + /** ImportYumArtifactsResponse yumArtifacts. */ + public yumArtifacts: google.devtools.artifactregistry.v1beta2.IYumArtifact[]; - /** GetVersionRequest view. */ - public view: (google.devtools.artifactregistry.v1beta2.VersionView|keyof typeof google.devtools.artifactregistry.v1beta2.VersionView); + /** ImportYumArtifactsResponse errors. */ + public errors: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo[]; /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new ImportYumArtifactsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetVersionRequest instance + * @returns ImportYumArtifactsResponse instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IGetVersionRequest): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.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.v1beta2.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVersionRequest 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 GetVersionRequest + * @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.v1beta2.GetVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; /** - * Decodes a GetVersionRequest 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 GetVersionRequest + * @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.v1beta2.GetVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; /** - * Verifies a GetVersionRequest 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 GetVersionRequest 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 GetVersionRequest + * @returns ImportYumArtifactsResponse */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.GetVersionRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest + * 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.v1beta2.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVersionRequest to JSON. + * Converts this ImportYumArtifactsResponse 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); + /** Properties of an ImportYumArtifactsMetadata. */ + interface IImportYumArtifactsMetadata { } - /** Represents a DeleteVersionRequest. */ - class DeleteVersionRequest implements IDeleteVersionRequest { + /** Represents an ImportYumArtifactsMetadata. */ + class ImportYumArtifactsMetadata implements IImportYumArtifactsMetadata { /** - * Constructs a new DeleteVersionRequest. + * Constructs a new ImportYumArtifactsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest); - - /** DeleteVersionRequest name. */ - public name: string; - - /** DeleteVersionRequest force. */ - public force: boolean; + constructor(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata); /** - * Creates a new DeleteVersionRequest instance using the specified properties. + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteVersionRequest instance + * @returns ImportYumArtifactsMetadata instance */ - public static create(properties?: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + public static create(properties?: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode + * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata.verify|verify} messages. + * @param message ImportYumArtifactsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * 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 DeleteVersionRequest + * @returns ImportYumArtifactsMetadata * @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.v1beta2.DeleteVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteVersionRequest + * @returns ImportYumArtifactsMetadata * @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.v1beta2.DeleteVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; /** - * Verifies a DeleteVersionRequest message. + * Verifies an ImportYumArtifactsMetadata 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. + * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteVersionRequest + * @returns ImportYumArtifactsMetadata */ - public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.DeleteVersionRequest; + public static fromObject(object: { [k: string]: any }): google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata; /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @param message DeleteVersionRequest + * 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 */ - public static toObject(message: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteVersionRequest to JSON. + * Converts this ImportYumArtifactsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -7859,295 +9565,571 @@ export namespace google { /** Properties of a GeneratedCodeInfo. */ interface IGeneratedCodeInfo { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + 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, 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 a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.protobuf.ITimestamp); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace GeneratedCodeInfo { + /** Properties of an Any. */ + interface IAny { - /** Properties of an Annotation. */ - interface IAnnotation { + /** Any type_url */ + type_url?: (string|null); - /** Annotation path */ - path?: (number[]|null); + /** Any value */ + value?: (Uint8Array|string|null); + } - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** Represents an Any. */ + class Any implements IAny { - /** Annotation begin */ - begin?: (number|null); + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); - /** Annotation end */ - end?: (number|null); - } + /** Any type_url. */ + public type_url: string; - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Any value. */ + public value: (Uint8Array|string); - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** + * 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; - /** Annotation path. */ - public path: number[]; + /** + * 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; - /** Annotation sourceFile. */ - public sourceFile: string; + /** + * 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; - /** Annotation begin. */ - public begin: number; + /** + * 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; - /** Annotation end. */ - public end: number; + /** + * 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 a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): 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); - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 }; - /** - * 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; + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - /** - * 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; + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - /** - * 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 }; + /** + * 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); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - /** Properties of a Timestamp. */ - interface ITimestamp { + /** + * 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 }; - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Timestamp nanos */ - nanos?: (number|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new Timestamp. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp 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 Timestamp + * @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.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a Timestamp 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 Timestamp + * @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.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a Timestamp 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 Timestamp 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 Timestamp + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -8243,277 +10225,309 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); + /** Properties of a Struct. */ + interface IStruct { - /** Any value */ - value?: (Uint8Array|string|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new Any. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; + constructor(properties?: google.protobuf.IStruct); - /** Any value. */ - public value: (Uint8Array|string); + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a new Any instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns Struct instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; /** - * 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 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IStruct, 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 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any 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 Any + * @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.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; /** - * Decodes an Any 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 Any + * @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.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; /** - * Verifies an Any 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 an Any 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 Any + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * 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 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of a Value. */ + interface IValue { - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** Duration nanos */ - nanos?: (number|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 Duration. */ - class Duration implements IDuration { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new Duration. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.protobuf.IValue); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - /** Duration nanos. */ - public nanos: number; + /** 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 Duration instance using the specified properties. + * Creates a new Value instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Value instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; /** - * 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 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IValue, 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 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration 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 Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; /** - * Decodes a Duration 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 Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; /** - * Verifies a Duration 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 a Duration 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 Duration + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * 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 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Empty. */ - interface IEmpty { + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new Empty. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns ListValue instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; /** - * 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 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IListValue, 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 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty 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 Empty + * @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.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; /** - * Decodes an Empty 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 Empty + * @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.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; /** - * Verifies an Empty 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 an Empty 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 Empty + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * 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 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/protos/protos.js b/protos/protos.js index b2ce3ae..f16cbbb 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -2114,25 +2114,29 @@ */ var v1beta2 = {}; - v1beta2.Hash = (function() { + v1beta2.AptArtifact = (function() { /** - * Properties of a Hash. + * Properties of an AptArtifact. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IHash - * @property {google.devtools.artifactregistry.v1beta2.Hash.HashType|null} [type] Hash type - * @property {Uint8Array|null} [value] Hash value + * @interface IAptArtifact + * @property {string|null} [name] AptArtifact name + * @property {string|null} [packageName] AptArtifact packageName + * @property {google.devtools.artifactregistry.v1beta2.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 Hash. + * Constructs a new AptArtifact. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Hash. - * @implements IHash + * @classdesc Represents an AptArtifact. + * @implements IAptArtifact * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set */ - function Hash(properties) { + function AptArtifact(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2140,88 +2144,140 @@ } /** - * Hash type. - * @member {google.devtools.artifactregistry.v1beta2.Hash.HashType} type - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * AptArtifact name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @instance */ - Hash.prototype.type = 0; + AptArtifact.prototype.name = ""; /** - * Hash value. - * @member {Uint8Array} value - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * AptArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @instance */ - Hash.prototype.value = $util.newBuffer([]); + AptArtifact.prototype.packageName = ""; /** - * Creates a new Hash instance using the specified properties. + * AptArtifact packageType. + * @member {google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.packageType = 0; + + /** + * AptArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.architecture = ""; + + /** + * AptArtifact component. + * @member {string} component + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.component = ""; + + /** + * AptArtifact controlFile. + * @member {Uint8Array} controlFile + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact + * @instance + */ + AptArtifact.prototype.controlFile = $util.newBuffer([]); + + /** + * Creates a new AptArtifact instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash instance + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact instance */ - Hash.create = function create(properties) { - return new Hash(properties); + AptArtifact.create = function create(properties) { + return new AptArtifact(properties); }; /** - * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. + * Encodes the specified AptArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1beta2.IHash} message Hash message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact} message AptArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Hash.encode = function encode(message, writer) { + AptArtifact.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); + 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); + 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 Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. + * Encodes the specified AptArtifact message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.AptArtifact.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1beta2.IHash} message Hash message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IAptArtifact} message AptArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Hash.encodeDelimited = function encodeDelimited(message, writer) { + AptArtifact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Hash message from the specified reader or buffer. + * Decodes an AptArtifact message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.Hash} Hash + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact * @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) { + 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.v1beta2.Hash(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.AptArtifact(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); + message.name = reader.string(); break; case 2: - message.value = reader.bytes(); + message.packageName = reader.string(); + break; + case 3: + message.packageType = reader.int32(); + break; + case 4: + message.architecture = reader.string(); + break; + case 5: + message.component = reader.string(); + break; + case 6: + message.controlFile = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -2232,158 +2288,193 @@ }; /** - * Decodes a Hash 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.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact * @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) { + AptArtifact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Hash message. + * Verifies an AptArtifact message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @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) { + AptArtifact.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + 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 "type: enum value expected"; + return "packageType: 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"; + 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 Hash 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.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash + * @returns {google.devtools.artifactregistry.v1beta2.AptArtifact} AptArtifact */ - Hash.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Hash) + AptArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.AptArtifact) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.Hash(); - switch (object.type) { - case "HASH_TYPE_UNSPECIFIED": + var message = new $root.google.devtools.artifactregistry.v1beta2.AptArtifact(); + 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.type = 0; + message.packageType = 0; break; - case "SHA256": + case "BINARY": case 1: - message.type = 1; + message.packageType = 1; + break; + case "SOURCE": + case 2: + message.packageType = 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; + 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 Hash 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.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @static - * @param {google.devtools.artifactregistry.v1beta2.Hash} message Hash + * @param {google.devtools.artifactregistry.v1beta2.AptArtifact} message AptArtifact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Hash.toObject = function toObject(message, options) { + AptArtifact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = options.enums === String ? "HASH_TYPE_UNSPECIFIED" : 0; + object.name = ""; + object.packageName = ""; + object.packageType = options.enums === String ? "PACKAGE_TYPE_UNSPECIFIED" : 0; + object.architecture = ""; + object.component = ""; if (options.bytes === String) - object.value = ""; + object.controlFile = ""; else { - object.value = []; + object.controlFile = []; if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); + object.controlFile = $util.newBuffer(object.controlFile); } } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.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; + 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.v1beta2.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 Hash to JSON. + * Converts this AptArtifact to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Hash + * @memberof google.devtools.artifactregistry.v1beta2.AptArtifact * @instance * @returns {Object.} JSON object */ - Hash.prototype.toJSON = function toJSON() { + AptArtifact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * HashType enum. - * @name google.devtools.artifactregistry.v1beta2.Hash.HashType + * PackageType enum. + * @name google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType * @enum {number} - * @property {number} HASH_TYPE_UNSPECIFIED=0 HASH_TYPE_UNSPECIFIED value - * @property {number} SHA256=1 SHA256 value + * @property {number} PACKAGE_TYPE_UNSPECIFIED=0 PACKAGE_TYPE_UNSPECIFIED value + * @property {number} BINARY=1 BINARY value + * @property {number} SOURCE=2 SOURCE value */ - Hash.HashType = (function() { + AptArtifact.PackageType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HASH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SHA256"] = 1; + values[valuesById[0] = "PACKAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY"] = 1; + values[valuesById[2] = "SOURCE"] = 2; return values; })(); - return Hash; + return AptArtifact; })(); - v1beta2.File = (function() { + v1beta2.ImportAptArtifactsGcsSource = (function() { /** - * Properties of a File. + * Properties of an ImportAptArtifactsGcsSource. * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * @interface IImportAptArtifactsGcsSource + * @property {Array.|null} [uris] ImportAptArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportAptArtifactsGcsSource useWildcards */ /** - * Constructs a new File. + * Constructs a new ImportAptArtifactsGcsSource. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a File. - * @implements IFile + * @classdesc Represents an ImportAptArtifactsGcsSource. + * @implements IImportAptArtifactsGcsSource * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set */ - function File(properties) { - this.hashes = []; + function ImportAptArtifactsGcsSource(properties) { + this.uris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2391,143 +2482,91 @@ } /** - * File name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.File - * @instance - */ - File.prototype.name = ""; - - /** - * File sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.devtools.artifactregistry.v1beta2.File - * @instance - */ - File.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * File hashes. - * @member {Array.} hashes - * @memberof google.devtools.artifactregistry.v1beta2.File - * @instance - */ - File.prototype.hashes = $util.emptyArray; - - /** - * File createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1beta2.File - * @instance - */ - File.prototype.createTime = null; - - /** - * File updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1beta2.File + * ImportAptArtifactsGcsSource uris. + * @member {Array.} uris + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @instance */ - File.prototype.updateTime = null; + ImportAptArtifactsGcsSource.prototype.uris = $util.emptyArray; /** - * File owner. - * @member {string} owner - * @memberof google.devtools.artifactregistry.v1beta2.File + * ImportAptArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @instance */ - File.prototype.owner = ""; + ImportAptArtifactsGcsSource.prototype.useWildcards = false; /** - * Creates a new File instance using the specified properties. + * Creates a new ImportAptArtifactsGcsSource instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.File} File instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource instance */ - File.create = function create(properties) { - return new File(properties); + ImportAptArtifactsGcsSource.create = function create(properties) { + return new ImportAptArtifactsGcsSource(properties); }; /** - * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. + * Encodes the specified ImportAptArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1beta2.IFile} message File message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encode = function encode(message, writer) { + ImportAptArtifactsGcsSource.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.v1beta2.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); + 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 File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. + * Encodes the specified ImportAptArtifactsGcsSource message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1beta2.IFile} message File message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsGcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a File message from the specified reader or buffer. + * Decodes an ImportAptArtifactsGcsSource message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.File} File + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource * @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) { + 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.v1beta2.File(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource(); 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.v1beta2.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()); + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); break; - case 7: - message.owner = reader.string(); + case 2: + message.useWildcards = reader.bool(); break; default: reader.skipType(tag & 7); @@ -2538,193 +2577,129 @@ }; /** - * Decodes a File 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.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.File} File + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource * @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) { + ImportAptArtifactsGcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a File message. + * Verifies an ImportAptArtifactsGcsSource message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @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) { + ImportAptArtifactsGcsSource.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.v1beta2.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.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.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + if (typeof message.useWildcards !== "boolean") + return "useWildcards: boolean expected"; return null; }; /** - * Creates a File 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.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.File} File + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} ImportAptArtifactsGcsSource */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.File) + ImportAptArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.File.hashes: object expected"); - message.hashes[i] = $root.google.devtools.artifactregistry.v1beta2.Hash.fromObject(object.hashes[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.File.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.File.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.owner != null) - message.owner = String(object.owner); + if (object.useWildcards != null) + message.useWildcards = Boolean(object.useWildcards); return message; }; /** - * Creates a plain object from a File 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.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @static - * @param {google.devtools.artifactregistry.v1beta2.File} message File + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource} message ImportAptArtifactsGcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - File.toObject = function toObject(message, options) { + ImportAptArtifactsGcsSource.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.v1beta2.Hash.toObject(message.hashes[j], options); + 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.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; + if (message.useWildcards != null && message.hasOwnProperty("useWildcards")) + object.useWildcards = message.useWildcards; return object; }; /** - * Converts this File to JSON. + * Converts this ImportAptArtifactsGcsSource to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.File + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource * @instance * @returns {Object.} JSON object */ - File.prototype.toJSON = function toJSON() { + ImportAptArtifactsGcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return File; + return ImportAptArtifactsGcsSource; })(); - v1beta2.ListFilesRequest = (function() { + v1beta2.ImportAptArtifactsRequest = (function() { /** - * Properties of a ListFilesRequest. + * Properties of an ImportAptArtifactsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * @interface IImportAptArtifactsRequest + * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsRequest gcsSource + * @property {string|null} [parent] ImportAptArtifactsRequest parent */ /** - * Constructs a new ListFilesRequest. + * Constructs a new ImportAptArtifactsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListFilesRequest. - * @implements IListFilesRequest + * @classdesc Represents an ImportAptArtifactsRequest. + * @implements IImportAptArtifactsRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set */ - function ListFilesRequest(properties) { + function ImportAptArtifactsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2732,114 +2707,102 @@ } /** - * ListFilesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * ImportAptArtifactsRequest gcsSource. + * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @instance */ - ListFilesRequest.prototype.parent = ""; + ImportAptArtifactsRequest.prototype.gcsSource = null; /** - * ListFilesRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * ImportAptArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @instance */ - ListFilesRequest.prototype.filter = ""; + ImportAptArtifactsRequest.prototype.parent = ""; - /** - * ListFilesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest - * @instance - */ - ListFilesRequest.prototype.pageSize = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListFilesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * ImportAptArtifactsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @instance */ - ListFilesRequest.prototype.pageToken = ""; + Object.defineProperty(ImportAptArtifactsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListFilesRequest instance using the specified properties. + * Creates a new ImportAptArtifactsRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest instance */ - ListFilesRequest.create = function create(properties) { - return new ListFilesRequest(properties); + ImportAptArtifactsRequest.create = function create(properties) { + return new ImportAptArtifactsRequest(properties); }; /** - * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFilesRequest.encode = function encode(message, writer) { + ImportAptArtifactsRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} message ListFilesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest} message ImportAptArtifactsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFilesRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListFilesRequest} ListFilesRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest * @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) { + 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.v1beta2.ListFilesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest(); 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(); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); break; - case 3: - message.pageToken = reader.string(); + case 1: + message.parent = reader.string(); break; default: reader.skipType(tag & 7); @@ -2850,134 +2813,127 @@ }; /** - * Decodes a ListFilesRequest 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.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest * @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) { + ImportAptArtifactsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFilesRequest message. + * Verifies an ImportAptArtifactsRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @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) { + ImportAptArtifactsRequest.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.v1beta2.ImportAptArtifactsGcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } 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 ListFilesRequest 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.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} ImportAptArtifactsRequest */ - ListFilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest) + ImportAptArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest(); + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); + } 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 ListFilesRequest 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.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ListFilesRequest} message ListFilesRequest + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest} message ImportAptArtifactsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFilesRequest.toObject = function toObject(message, options) { + ImportAptArtifactsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + 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; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } return object; }; /** - * Converts this ListFilesRequest to JSON. + * Converts this ImportAptArtifactsRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest * @instance * @returns {Object.} JSON object */ - ListFilesRequest.prototype.toJSON = function toJSON() { + ImportAptArtifactsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFilesRequest; + return ImportAptArtifactsRequest; })(); - v1beta2.ListFilesResponse = (function() { + v1beta2.ImportAptArtifactsErrorInfo = (function() { /** - * Properties of a ListFilesResponse. + * Properties of an ImportAptArtifactsErrorInfo. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListFilesResponse - * @property {Array.|null} [files] ListFilesResponse files - * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken + * @interface IImportAptArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null} [gcsSource] ImportAptArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportAptArtifactsErrorInfo error */ /** - * Constructs a new ListFilesResponse. + * Constructs a new ImportAptArtifactsErrorInfo. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListFilesResponse. - * @implements IListFilesResponse + * @classdesc Represents an ImportAptArtifactsErrorInfo. + * @implements IImportAptArtifactsErrorInfo * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set */ - function ListFilesResponse(properties) { - this.files = []; + function ImportAptArtifactsErrorInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2985,91 +2941,102 @@ } /** - * ListFilesResponse files. - * @member {Array.} files - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * ImportAptArtifactsErrorInfo gcsSource. + * @member {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @instance */ - ListFilesResponse.prototype.files = $util.emptyArray; + ImportAptArtifactsErrorInfo.prototype.gcsSource = null; /** - * ListFilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * ImportAptArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @instance */ - ListFilesResponse.prototype.nextPageToken = ""; + ImportAptArtifactsErrorInfo.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListFilesResponse instance using the specified properties. + * ImportAptArtifactsErrorInfo source. + * @member {"gcsSource"|undefined} source + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + * @instance + */ + Object.defineProperty(ImportAptArtifactsErrorInfo.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportAptArtifactsErrorInfo instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo instance */ - ListFilesResponse.create = function create(properties) { - return new ListFilesResponse(properties); + ImportAptArtifactsErrorInfo.create = function create(properties) { + return new ImportAptArtifactsErrorInfo(properties); }; /** - * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFilesResponse.encode = function encode(message, writer) { + ImportAptArtifactsErrorInfo.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.v1beta2.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); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.devtools.artifactregistry.v1beta2.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 ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. + * Encodes the specified ImportAptArtifactsErrorInfo message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse} message ListFilesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFilesResponse message from the specified reader or buffer. + * Decodes an ImportAptArtifactsErrorInfo message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListFilesResponse} ListFilesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo * @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) { + 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.v1beta2.ListFilesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo(); 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.v1beta2.File.decode(reader, reader.uint32())); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3080,133 +3047,134 @@ }; /** - * Decodes a ListFilesResponse 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.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo * @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) { + ImportAptArtifactsErrorInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFilesResponse message. + * Verifies an ImportAptArtifactsErrorInfo message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @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) { + ImportAptArtifactsErrorInfo.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.v1beta2.File.verify(message.files[i]); + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.verify(message.gcsSource); if (error) - return "files." + error; + return "gcsSource." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } return null; }; /** - * Creates a ListFilesResponse 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.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} ImportAptArtifactsErrorInfo */ - ListFilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse) + ImportAptArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse(); - if (object.files) { - if (!Array.isArray(object.files)) - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListFilesResponse.files: object expected"); - message.files[i] = $root.google.devtools.artifactregistry.v1beta2.File.fromObject(object.files[i]); - } + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); } - 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. + * Creates a plain object from an ImportAptArtifactsErrorInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @static - * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} message ListFilesResponse + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo} message ImportAptArtifactsErrorInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFilesResponse.toObject = function toObject(message, options) { + ImportAptArtifactsErrorInfo.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.v1beta2.File.toObject(message.files[j], options); + object.error = null; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); return object; }; /** - * Converts this ListFilesResponse to JSON. + * Converts this ImportAptArtifactsErrorInfo to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo * @instance * @returns {Object.} JSON object */ - ListFilesResponse.prototype.toJSON = function toJSON() { + ImportAptArtifactsErrorInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFilesResponse; + return ImportAptArtifactsErrorInfo; })(); - v1beta2.GetFileRequest = (function() { + v1beta2.ImportAptArtifactsResponse = (function() { /** - * Properties of a GetFileRequest. + * Properties of an ImportAptArtifactsResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetFileRequest - * @property {string|null} [name] GetFileRequest name + * @interface IImportAptArtifactsResponse + * @property {Array.|null} [aptArtifacts] ImportAptArtifactsResponse aptArtifacts + * @property {Array.|null} [errors] ImportAptArtifactsResponse errors */ /** - * Constructs a new GetFileRequest. + * Constructs a new ImportAptArtifactsResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetFileRequest. - * @implements IGetFileRequest + * @classdesc Represents an ImportAptArtifactsResponse. + * @implements IImportAptArtifactsResponse * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set */ - function GetFileRequest(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) @@ -3214,75 +3182,94 @@ } /** - * GetFileRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * ImportAptArtifactsResponse aptArtifacts. + * @member {Array.} aptArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @instance */ - GetFileRequest.prototype.name = ""; + ImportAptArtifactsResponse.prototype.aptArtifacts = $util.emptyArray; /** - * Creates a new GetFileRequest instance using the specified properties. + * ImportAptArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + * @instance + */ + ImportAptArtifactsResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportAptArtifactsResponse instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse instance */ - GetFileRequest.create = function create(properties) { - return new GetFileRequest(properties); + ImportAptArtifactsResponse.create = function create(properties) { + return new ImportAptArtifactsResponse(properties); }; /** - * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFileRequest.encode = function encode(message, writer) { + ImportAptArtifactsResponse.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.aptArtifacts != null && message.aptArtifacts.length) + for (var i = 0; i < message.aptArtifacts.length; ++i) + $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportAptArtifactsErrorInfo.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. + * Encodes the specified ImportAptArtifactsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse} message ImportAptArtifactsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFileRequest message from the specified reader or buffer. + * Decodes an ImportAptArtifactsResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.GetFileRequest} GetFileRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse * @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) { + 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.v1beta2.GetFileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.aptArtifacts && message.aptArtifacts.length)) + message.aptArtifacts = []; + message.aptArtifacts.push($root.google.devtools.artifactregistry.v1beta2.AptArtifact.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3293,110 +3280,149 @@ }; /** - * Decodes a GetFileRequest 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.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse * @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) { + ImportAptArtifactsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFileRequest message. + * Verifies an ImportAptArtifactsResponse message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @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) { + ImportAptArtifactsResponse.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.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.v1beta2.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.v1beta2.ImportAptArtifactsErrorInfo.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } return null; }; /** - * Creates a GetFileRequest 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.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} ImportAptArtifactsResponse */ - GetFileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetFileRequest) + ImportAptArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.GetFileRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse(); + if (object.aptArtifacts) { + if (!Array.isArray(object.aptArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportAptArtifactsResponse.aptArtifacts: object expected"); + message.aptArtifacts[i] = $root.google.devtools.artifactregistry.v1beta2.AptArtifact.fromObject(object.aptArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportAptArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.fromObject(object.errors[i]); + } + } return message; }; /** - * Creates a plain object from a GetFileRequest 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.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.GetFileRequest} message GetFileRequest + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse} message ImportAptArtifactsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFileRequest.toObject = function toObject(message, options) { + ImportAptArtifactsResponse.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.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.v1beta2.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.v1beta2.ImportAptArtifactsErrorInfo.toObject(message.errors[j], options); + } return object; }; /** - * Converts this GetFileRequest to JSON. + * Converts this ImportAptArtifactsResponse to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse * @instance * @returns {Object.} JSON object */ - GetFileRequest.prototype.toJSON = function toJSON() { + ImportAptArtifactsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFileRequest; + return ImportAptArtifactsResponse; })(); - v1beta2.Package = (function() { + v1beta2.ImportAptArtifactsMetadata = (function() { /** - * Properties of a Package. + * Properties of an ImportAptArtifactsMetadata. * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * @interface IImportAptArtifactsMetadata */ /** - * Constructs a new Package. + * Constructs a new ImportAptArtifactsMetadata. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Package. - * @implements IPackage + * @classdesc Represents an ImportAptArtifactsMetadata. + * @implements IImportAptArtifactsMetadata * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set */ - function Package(properties) { + function ImportAptArtifactsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3404,115 +3430,63 @@ } /** - * Package name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @instance - */ - Package.prototype.name = ""; - - /** - * Package displayName. - * @member {string} displayName - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @instance - */ - Package.prototype.displayName = ""; - - /** - * Package createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @instance - */ - Package.prototype.createTime = null; - - /** - * Package updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1beta2.Package - * @instance - */ - Package.prototype.updateTime = null; - - /** - * Creates a new Package instance using the specified properties. + * Creates a new ImportAptArtifactsMetadata instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Package} Package instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata instance */ - Package.create = function create(properties) { - return new Package(properties); + ImportAptArtifactsMetadata.create = function create(properties) { + return new ImportAptArtifactsMetadata(properties); }; /** - * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. + * Encodes the specified ImportAptArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IPackage} message Package message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encode = function encode(message, writer) { + ImportAptArtifactsMetadata.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.v1beta2.Package.verify|verify} messages. + * Encodes the specified ImportAptArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IPackage} message Package message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata} message ImportAptArtifactsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encodeDelimited = function encodeDelimited(message, writer) { + ImportAptArtifactsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Package message from the specified reader or buffer. + * Decodes an ImportAptArtifactsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.Package} Package + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata * @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) { + 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.v1beta2.Package(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata(); 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; @@ -3522,144 +3496,95 @@ }; /** - * Decodes a Package 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.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.Package} Package + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata * @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) { + ImportAptArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Package message. + * Verifies an ImportAptArtifactsMetadata message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @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) { + ImportAptArtifactsMetadata.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. + * Creates an ImportAptArtifactsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Package} Package + * @returns {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} ImportAptArtifactsMetadata */ - Package.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Package) + ImportAptArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.Package.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; + return new $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata(); }; /** - * Creates a plain object from a Package 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.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.Package} message Package + * @param {google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata} message ImportAptArtifactsMetadata * @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; + ImportAptArtifactsMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this Package to JSON. + * Converts this ImportAptArtifactsMetadata to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Package + * @memberof google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata * @instance * @returns {Object.} JSON object */ - Package.prototype.toJSON = function toJSON() { + ImportAptArtifactsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Package; + return ImportAptArtifactsMetadata; })(); - v1beta2.ListPackagesRequest = (function() { + v1beta2.Hash = (function() { /** - * Properties of a ListPackagesRequest. + * Properties of a Hash. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListPackagesRequest - * @property {string|null} [parent] ListPackagesRequest parent - * @property {number|null} [pageSize] ListPackagesRequest pageSize - * @property {string|null} [pageToken] ListPackagesRequest pageToken + * @interface IHash + * @property {google.devtools.artifactregistry.v1beta2.Hash.HashType|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value */ /** - * Constructs a new ListPackagesRequest. + * Constructs a new Hash. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListPackagesRequest. - * @implements IListPackagesRequest + * @classdesc Represents a Hash. + * @implements IHash * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set */ - function ListPackagesRequest(properties) { + function Hash(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3667,101 +3592,88 @@ } /** - * ListPackagesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest - * @instance - */ - ListPackagesRequest.prototype.parent = ""; - - /** - * ListPackagesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * Hash type. + * @member {google.devtools.artifactregistry.v1beta2.Hash.HashType} type + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @instance */ - ListPackagesRequest.prototype.pageSize = 0; + Hash.prototype.type = 0; /** - * ListPackagesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * Hash value. + * @member {Uint8Array} value + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @instance */ - ListPackagesRequest.prototype.pageToken = ""; + Hash.prototype.value = $util.newBuffer([]); /** - * Creates a new ListPackagesRequest instance using the specified properties. + * Creates a new Hash instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IHash=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash instance */ - ListPackagesRequest.create = function create(properties) { - return new ListPackagesRequest(properties); + Hash.create = function create(properties) { + return new Hash(properties); }; /** - * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IHash} message Hash message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPackagesRequest.encode = function encode(message, writer) { + Hash.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.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 ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Hash.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} message ListPackagesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IHash} message Hash message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Hash.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPackagesRequest message from the specified reader or buffer. + * Decodes a Hash message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListPackagesRequest} ListPackagesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash * @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) { + 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.v1beta2.ListPackagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.Hash(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.type = reader.int32(); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -3772,126 +3684,165 @@ }; /** - * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. + * Decodes a Hash message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash * @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) { + Hash.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPackagesRequest message. + * Verifies a Hash message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @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) { + Hash.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.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 ListPackagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Hash message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Hash} Hash */ - ListPackagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest) + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Hash) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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); + var message = new $root.google.devtools.artifactregistry.v1beta2.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 ListPackagesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Hash message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @static - * @param {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} message ListPackagesRequest + * @param {google.devtools.artifactregistry.v1beta2.Hash} message Hash * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPackagesRequest.toObject = function toObject(message, options) { + Hash.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + 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.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.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.artifactregistry.v1beta2.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 ListPackagesRequest to JSON. + * Converts this Hash to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Hash * @instance * @returns {Object.} JSON object */ - ListPackagesRequest.prototype.toJSON = function toJSON() { + Hash.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPackagesRequest; - })(); - - v1beta2.ListPackagesResponse = (function() { - /** - * Properties of a ListPackagesResponse. + * HashType enum. + * @name google.devtools.artifactregistry.v1beta2.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; + })(); + + v1beta2.File = (function() { + + /** + * Properties of a File. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListPackagesResponse - * @property {Array.|null} [packages] ListPackagesResponse packages - * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken + * @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 ListPackagesResponse. + * Constructs a new File. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListPackagesResponse. - * @implements IListPackagesResponse + * @classdesc Represents a File. + * @implements IFile * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set */ - function ListPackagesResponse(properties) { - this.packages = []; + function File(properties) { + this.hashes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3899,91 +3850,143 @@ } /** - * ListPackagesResponse packages. - * @member {Array.} packages - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * File name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.File * @instance */ - ListPackagesResponse.prototype.packages = $util.emptyArray; + File.prototype.name = ""; /** - * ListPackagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * File sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.devtools.artifactregistry.v1beta2.File * @instance */ - ListPackagesResponse.prototype.nextPageToken = ""; + File.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ListPackagesResponse instance using the specified properties. + * File hashes. + * @member {Array.} hashes + * @memberof google.devtools.artifactregistry.v1beta2.File + * @instance + */ + File.prototype.hashes = $util.emptyArray; + + /** + * File createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1beta2.File + * @instance + */ + File.prototype.createTime = null; + + /** + * File updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1beta2.File + * @instance + */ + File.prototype.updateTime = null; + + /** + * File owner. + * @member {string} owner + * @memberof google.devtools.artifactregistry.v1beta2.File + * @instance + */ + File.prototype.owner = ""; + + /** + * Creates a new File instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse instance + * @param {google.devtools.artifactregistry.v1beta2.IFile=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.File} File instance */ - ListPackagesResponse.create = function create(properties) { - return new ListPackagesResponse(properties); + File.create = function create(properties) { + return new File(properties); }; /** - * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. + * Encodes the specified File message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPackagesResponse.encode = function encode(message, writer) { + File.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.v1beta2.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); + 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.v1beta2.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 ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. + * Encodes the specified File message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.File.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse} message ListPackagesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + File.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPackagesResponse message from the specified reader or buffer. + * Decodes a File message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListPackagesResponse} ListPackagesResponse + * @returns {google.devtools.artifactregistry.v1beta2.File} File * @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) { + 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.v1beta2.ListPackagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.File(); 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.v1beta2.Package.decode(reader, reader.uint32())); + message.name = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.sizeBytes = reader.int64(); + break; + case 4: + if (!(message.hashes && message.hashes.length)) + message.hashes = []; + message.hashes.push($root.google.devtools.artifactregistry.v1beta2.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); @@ -3994,133 +3997,193 @@ }; /** - * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse + * @returns {google.devtools.artifactregistry.v1beta2.File} File * @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) { + File.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPackagesResponse message. + * Verifies a File message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @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) { + File.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.v1beta2.Package.verify(message.packages[i]); + 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.v1beta2.Hash.verify(message.hashes[i]); if (error) - return "packages." + error; + return "hashes." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: 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.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; return null; }; /** - * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse + * @returns {google.devtools.artifactregistry.v1beta2.File} File */ - ListPackagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse) + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.File) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse(); - if (object.packages) { - if (!Array.isArray(object.packages)) - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListPackagesResponse.packages: object expected"); - message.packages[i] = $root.google.devtools.artifactregistry.v1beta2.Package.fromObject(object.packages[i]); + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.File.hashes: object expected"); + message.hashes[i] = $root.google.devtools.artifactregistry.v1beta2.Hash.fromObject(object.hashes[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.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 ListPackagesResponse message. Also converts values to other types if specified. + * Creates a plain object from a File message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @static - * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} message ListPackagesResponse + * @param {google.devtools.artifactregistry.v1beta2.File} message File * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPackagesResponse.toObject = function toObject(message, options) { + File.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.v1beta2.Package.toObject(message.packages[j], options); + 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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.v1beta2.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 ListPackagesResponse to JSON. + * Converts this File to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @memberof google.devtools.artifactregistry.v1beta2.File * @instance * @returns {Object.} JSON object */ - ListPackagesResponse.prototype.toJSON = function toJSON() { + File.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListPackagesResponse; + return File; })(); - v1beta2.GetPackageRequest = (function() { + v1beta2.ListFilesRequest = (function() { /** - * Properties of a GetPackageRequest. + * Properties of a ListFilesRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetPackageRequest - * @property {string|null} [name] GetPackageRequest name + * @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 */ /** - * Constructs a new GetPackageRequest. + * Constructs a new ListFilesRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetPackageRequest. - * @implements IGetPackageRequest + * @classdesc Represents a ListFilesRequest. + * @implements IListFilesRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set */ - function GetPackageRequest(properties) { + function ListFilesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4128,75 +4191,114 @@ } /** - * GetPackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * ListFilesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @instance */ - GetPackageRequest.prototype.name = ""; + ListFilesRequest.prototype.parent = ""; /** - * Creates a new GetPackageRequest instance using the specified properties. + * ListFilesRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.filter = ""; + + /** + * ListFilesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageSize = 0; + + /** + * ListFilesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest + * @instance + */ + ListFilesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListFilesRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest instance */ - GetPackageRequest.create = function create(properties) { - return new GetPackageRequest(properties); + ListFilesRequest.create = function create(properties) { + return new ListFilesRequest(properties); }; /** - * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. + * Encodes the specified ListFilesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} message ListFilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPackageRequest.encode = function encode(message, writer) { + ListFilesRequest.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.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 GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. + * Encodes the specified ListFilesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} message GetPackageRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} message ListFilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPackageRequest message from the specified reader or buffer. + * Decodes a ListFilesRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.GetPackageRequest} GetPackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest * @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) { + 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.v1beta2.GetPackageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + 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); @@ -4207,107 +4309,134 @@ }; /** - * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFilesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest * @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) { + ListFilesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPackageRequest message. + * Verifies a ListFilesRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @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) { + ListFilesRequest.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.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 GetPackageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFilesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesRequest} ListFilesRequest */ - GetPackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest) + ListFilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.artifactregistry.v1beta2.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); return message; }; /** - * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFilesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.GetPackageRequest} message GetPackageRequest + * @param {google.devtools.artifactregistry.v1beta2.ListFilesRequest} message ListFilesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPackageRequest.toObject = function toObject(message, options) { + ListFilesRequest.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.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 GetPackageRequest to JSON. + * Converts this ListFilesRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesRequest * @instance * @returns {Object.} JSON object */ - GetPackageRequest.prototype.toJSON = function toJSON() { + ListFilesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetPackageRequest; + return ListFilesRequest; })(); - v1beta2.DeletePackageRequest = (function() { + v1beta2.ListFilesResponse = (function() { /** - * Properties of a DeletePackageRequest. + * Properties of a ListFilesResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeletePackageRequest - * @property {string|null} [name] DeletePackageRequest name + * @interface IListFilesResponse + * @property {Array.|null} [files] ListFilesResponse files + * @property {string|null} [nextPageToken] ListFilesResponse nextPageToken */ /** - * Constructs a new DeletePackageRequest. + * Constructs a new ListFilesResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeletePackageRequest. - * @implements IDeletePackageRequest + * @classdesc Represents a ListFilesResponse. + * @implements IListFilesResponse * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set */ - function DeletePackageRequest(properties) { + function ListFilesResponse(properties) { + this.files = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4315,75 +4444,91 @@ } /** - * DeletePackageRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * ListFilesResponse files. + * @member {Array.} files + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @instance */ - DeletePackageRequest.prototype.name = ""; + ListFilesResponse.prototype.files = $util.emptyArray; /** - * Creates a new DeletePackageRequest instance using the specified properties. + * ListFilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse + * @instance + */ + ListFilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFilesResponse instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse instance */ - DeletePackageRequest.create = function create(properties) { - return new DeletePackageRequest(properties); + ListFilesResponse.create = function create(properties) { + return new ListFilesResponse(properties); }; /** - * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. + * Encodes the specified ListFilesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse} message ListFilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePackageRequest.encode = function encode(message, writer) { + ListFilesResponse.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.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.devtools.artifactregistry.v1beta2.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 DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. + * Encodes the specified ListFilesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListFilesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListFilesResponse} message ListFilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePackageRequest message from the specified reader or buffer. + * Decodes a ListFilesResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.DeletePackageRequest} DeletePackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse * @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) { + 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.v1beta2.DeletePackageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.devtools.artifactregistry.v1beta2.File.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4394,114 +4539,133 @@ }; /** - * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFilesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse * @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) { + ListFilesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePackageRequest message. + * Verifies a ListFilesResponse message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @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) { + ListFilesResponse.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.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.v1beta2.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 DeletePackageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFilesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListFilesResponse} ListFilesResponse */ - DeletePackageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest) + ListFilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListFilesResponse.files: object expected"); + message.files[i] = $root.google.devtools.artifactregistry.v1beta2.File.fromObject(object.files[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFilesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} message DeletePackageRequest + * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} message ListFilesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePackageRequest.toObject = function toObject(message, options) { + ListFilesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.files = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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.v1beta2.File.toObject(message.files[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeletePackageRequest to JSON. + * Converts this ListFilesResponse to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListFilesResponse * @instance * @returns {Object.} JSON object */ - DeletePackageRequest.prototype.toJSON = function toJSON() { + ListFilesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeletePackageRequest; + return ListFilesResponse; })(); - v1beta2.Repository = (function() { + v1beta2.GetFileRequest = (function() { /** - * Properties of a Repository. + * Properties of a GetFileRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IRepository - * @property {string|null} [name] Repository name - * @property {google.devtools.artifactregistry.v1beta2.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 IGetFileRequest + * @property {string|null} [name] GetFileRequest name */ /** - * Constructs a new Repository. + * Constructs a new GetFileRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Repository. - * @implements IRepository + * @classdesc Represents a GetFileRequest. + * @implements IGetFileRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set */ - function Repository(properties) { - this.labels = {}; + function GetFileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4509,174 +4673,76 @@ } /** - * Repository name. + * GetFileRequest name. * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @instance */ - Repository.prototype.name = ""; + GetFileRequest.prototype.name = ""; /** - * Repository format. - * @member {google.devtools.artifactregistry.v1beta2.Repository.Format} format - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance + * Creates a new GetFileRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest instance */ - Repository.prototype.format = 0; + GetFileRequest.create = function create(properties) { + return new GetFileRequest(properties); + }; /** - * Repository description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance + * Encodes the specified GetFileRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Repository.prototype.description = ""; + 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; + }; /** - * Repository labels. - * @member {Object.} labels - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance + * Encodes the specified GetFileRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetFileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} message GetFileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Repository.prototype.labels = $util.emptyObject; - - /** - * Repository createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - */ - Repository.prototype.createTime = null; - - /** - * Repository updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - */ - Repository.prototype.updateTime = null; - - /** - * Repository kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @instance - */ - Repository.prototype.kmsKeyName = ""; - - /** - * Creates a new Repository instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository instance - */ - Repository.create = function create(properties) { - return new Repository(properties); - }; - - /** - * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {google.devtools.artifactregistry.v1beta2.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); - return writer; - }; - - /** - * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Repository - * @static - * @param {google.devtools.artifactregistry.v1beta2.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) { + GetFileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Repository message from the specified reader or buffer. + * Decodes a GetFileRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository} Repository + * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest * @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) { + 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.v1beta2.Repository(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.GetFileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { 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; @@ -4686,210 +4752,110 @@ }; /** - * Decodes a Repository message from the specified reader or buffer, length delimited. + * Decodes a GetFileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository + * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest * @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) { + GetFileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Repository message. + * Verifies a GetFileRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @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) { + 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"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - 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. + * Creates a GetFileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository + * @returns {google.devtools.artifactregistry.v1beta2.GetFileRequest} GetFileRequest */ - Repository.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Repository) + GetFileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetFileRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.Repository(); + var message = new $root.google.devtools.artifactregistry.v1beta2.GetFileRequest(); 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; - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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. + * Creates a plain object from a GetFileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.Repository} message Repository + * @param {google.devtools.artifactregistry.v1beta2.GetFileRequest} message GetFileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Repository.toObject = function toObject(message, options) { + GetFileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { + 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.v1beta2.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; return object; }; /** - * Converts this Repository to JSON. + * Converts this GetFileRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @memberof google.devtools.artifactregistry.v1beta2.GetFileRequest * @instance * @returns {Object.} JSON object */ - Repository.prototype.toJSON = function toJSON() { + GetFileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Format enum. - * @name google.devtools.artifactregistry.v1beta2.Repository.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} DOCKER=1 DOCKER value - */ - Repository.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOCKER"] = 1; - return values; - })(); - - return Repository; + return GetFileRequest; })(); - v1beta2.ListRepositoriesRequest = (function() { + v1beta2.Package = (function() { /** - * Properties of a ListRepositoriesRequest. + * Properties of a Package. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListRepositoriesRequest - * @property {string|null} [parent] ListRepositoriesRequest parent - * @property {number|null} [pageSize] ListRepositoriesRequest pageSize - * @property {string|null} [pageToken] ListRepositoriesRequest pageToken + * @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 ListRepositoriesRequest. + * Constructs a new Package. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListRepositoriesRequest. - * @implements IListRepositoriesRequest + * @classdesc Represents a Package. + * @implements IPackage * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set */ - function ListRepositoriesRequest(properties) { + function Package(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4897,101 +4863,114 @@ } /** - * ListRepositoriesRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * Package name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.Package * @instance */ - ListRepositoriesRequest.prototype.parent = ""; + Package.prototype.name = ""; /** - * ListRepositoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * Package displayName. + * @member {string} displayName + * @memberof google.devtools.artifactregistry.v1beta2.Package * @instance */ - ListRepositoriesRequest.prototype.pageSize = 0; + Package.prototype.displayName = ""; /** - * ListRepositoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * Package createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1beta2.Package * @instance */ - ListRepositoriesRequest.prototype.pageToken = ""; + Package.prototype.createTime = null; /** - * Creates a new ListRepositoriesRequest instance using the specified properties. + * Package updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1beta2.Package + * @instance + */ + Package.prototype.updateTime = null; + + /** + * Creates a new Package instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IPackage=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package instance */ - ListRepositoriesRequest.create = function create(properties) { - return new ListRepositoriesRequest(properties); + Package.create = function create(properties) { + return new Package(properties); }; /** - * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. + * Encodes the specified Package message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IPackage} message Package message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesRequest.encode = function encode(message, writer) { + Package.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.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 ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Package.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IPackage} message Package message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Package.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * Decodes a Package message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package * @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) { + 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.v1beta2.ListRepositoriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.Package(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.displayName = reader.string(); break; - case 3: - message.pageToken = reader.string(); + 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); @@ -5002,126 +4981,144 @@ }; /** - * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * Decodes a Package message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package * @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) { + Package.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRepositoriesRequest message. + * Verifies a Package message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @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) { + Package.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.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 ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Package message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest + * @returns {google.devtools.artifactregistry.v1beta2.Package} Package */ - ListRepositoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest) + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Package) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Package.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } return message; }; /** - * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Package message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @static - * @param {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} message ListRepositoriesRequest + * @param {google.devtools.artifactregistry.v1beta2.Package} message Package * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRepositoriesRequest.toObject = function toObject(message, options) { + Package.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; } - 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.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 ListRepositoriesRequest to JSON. + * Converts this Package to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @memberof google.devtools.artifactregistry.v1beta2.Package * @instance * @returns {Object.} JSON object */ - ListRepositoriesRequest.prototype.toJSON = function toJSON() { + Package.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListRepositoriesRequest; + return Package; })(); - v1beta2.ListRepositoriesResponse = (function() { + v1beta2.ListPackagesRequest = (function() { /** - * Properties of a ListRepositoriesResponse. + * Properties of a ListPackagesRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListRepositoriesResponse - * @property {Array.|null} [repositories] ListRepositoriesResponse repositories - * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken + * @interface IListPackagesRequest + * @property {string|null} [parent] ListPackagesRequest parent + * @property {number|null} [pageSize] ListPackagesRequest pageSize + * @property {string|null} [pageToken] ListPackagesRequest pageToken */ /** - * Constructs a new ListRepositoriesResponse. + * Constructs a new ListPackagesRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListRepositoriesResponse. - * @implements IListRepositoriesResponse - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse=} [properties] Properties to set + * @classdesc Represents a ListPackagesRequest. + * @implements IListPackagesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set */ - function ListRepositoriesResponse(properties) { - this.repositories = []; + function ListPackagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5129,91 +5126,101 @@ } /** - * ListRepositoriesResponse repositories. - * @member {Array.} repositories - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * ListPackagesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @instance */ - ListRepositoriesResponse.prototype.repositories = $util.emptyArray; + ListPackagesRequest.prototype.parent = ""; /** - * ListRepositoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * ListPackagesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @instance */ - ListRepositoriesResponse.prototype.nextPageToken = ""; + ListPackagesRequest.prototype.pageSize = 0; /** - * Creates a new ListRepositoriesResponse instance using the specified properties. + * ListPackagesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest + * @instance + */ + ListPackagesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPackagesRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse instance + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest instance */ - ListRepositoriesResponse.create = function create(properties) { - return new ListRepositoriesResponse(properties); + ListPackagesRequest.create = function create(properties) { + return new ListPackagesRequest(properties); }; /** - * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. + * Encodes the specified ListPackagesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} message ListPackagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesResponse.encode = function encode(message, writer) { + ListPackagesRequest.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.v1beta2.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); + 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 ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. + * Encodes the specified ListPackagesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse} message ListRepositoriesResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} message ListPackagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRepositoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListPackagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * Decodes a ListPackagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest * @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) { + 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.v1beta2.ListRepositoriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest(); 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.v1beta2.Repository.decode(reader, reader.uint32())); + message.parent = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5224,133 +5231,126 @@ }; /** - * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListPackagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest * @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) { + ListPackagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRepositoriesResponse message. + * Verifies a ListPackagesRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @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) { + ListPackagesRequest.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.v1beta2.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"; + 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 ListRepositoriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListPackagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} ListPackagesRequest */ - ListRepositoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse) + ListPackagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse(); - if (object.repositories) { - if (!Array.isArray(object.repositories)) - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListRepositoriesResponse.repositories: object expected"); - message.repositories[i] = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repositories[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.devtools.artifactregistry.v1beta2.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 ListRepositoriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListPackagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {google.devtools.artifactregistry.v1beta2.ListPackagesRequest} message ListPackagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRepositoriesResponse.toObject = function toObject(message, options) { + ListPackagesRequest.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.v1beta2.Repository.toObject(message.repositories[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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 ListRepositoriesResponse to JSON. + * Converts this ListPackagesRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesRequest * @instance * @returns {Object.} JSON object */ - ListRepositoriesResponse.prototype.toJSON = function toJSON() { + ListPackagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListRepositoriesResponse; + return ListPackagesRequest; })(); - v1beta2.GetRepositoryRequest = (function() { + v1beta2.ListPackagesResponse = (function() { /** - * Properties of a GetRepositoryRequest. + * Properties of a ListPackagesResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetRepositoryRequest - * @property {string|null} [name] GetRepositoryRequest name + * @interface IListPackagesResponse + * @property {Array.|null} [packages] ListPackagesResponse packages + * @property {string|null} [nextPageToken] ListPackagesResponse nextPageToken */ /** - * Constructs a new GetRepositoryRequest. + * Constructs a new ListPackagesResponse. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetRepositoryRequest. - * @implements IGetRepositoryRequest + * @classdesc Represents a ListPackagesResponse. + * @implements IListPackagesResponse * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set */ - function GetRepositoryRequest(properties) { + function ListPackagesResponse(properties) { + this.packages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5358,75 +5358,91 @@ } /** - * GetRepositoryRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * ListPackagesResponse packages. + * @member {Array.} packages + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @instance */ - GetRepositoryRequest.prototype.name = ""; + ListPackagesResponse.prototype.packages = $util.emptyArray; /** - * Creates a new GetRepositoryRequest instance using the specified properties. + * ListPackagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse + * @instance + */ + ListPackagesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPackagesResponse instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse instance */ - GetRepositoryRequest.create = function create(properties) { - return new GetRepositoryRequest(properties); + ListPackagesResponse.create = function create(properties) { + return new ListPackagesResponse(properties); }; /** - * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. + * Encodes the specified ListPackagesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse} message ListPackagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRepositoryRequest.encode = function encode(message, writer) { + ListPackagesResponse.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.packages != null && message.packages.length) + for (var i = 0; i < message.packages.length; ++i) + $root.google.devtools.artifactregistry.v1beta2.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 GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. + * Encodes the specified ListPackagesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListPackagesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesResponse} message ListPackagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPackagesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * Decodes a ListPackagesResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.GetRepositoryRequest} GetRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse * @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) { + 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.v1beta2.GetRepositoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.packages && message.packages.length)) + message.packages = []; + message.packages.push($root.google.devtools.artifactregistry.v1beta2.Package.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5437,109 +5453,133 @@ }; /** - * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPackagesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse * @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) { + ListPackagesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRepositoryRequest message. + * Verifies a ListPackagesResponse message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @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) { + ListPackagesResponse.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.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.v1beta2.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 GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPackagesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} ListPackagesResponse */ - GetRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest) + ListPackagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse(); + if (object.packages) { + if (!Array.isArray(object.packages)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListPackagesResponse.packages: object expected"); + message.packages[i] = $root.google.devtools.artifactregistry.v1beta2.Package.fromObject(object.packages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPackagesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @static - * @param {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} message GetRepositoryRequest + * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} message ListPackagesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRepositoryRequest.toObject = function toObject(message, options) { + ListPackagesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.packages = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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.v1beta2.Package.toObject(message.packages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetRepositoryRequest to JSON. + * Converts this ListPackagesResponse to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.ListPackagesResponse * @instance * @returns {Object.} JSON object */ - GetRepositoryRequest.prototype.toJSON = function toJSON() { + ListPackagesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetRepositoryRequest; + return ListPackagesResponse; })(); - v1beta2.CreateRepositoryRequest = (function() { + v1beta2.GetPackageRequest = (function() { /** - * Properties of a CreateRepositoryRequest. + * Properties of a GetPackageRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface ICreateRepositoryRequest - * @property {string|null} [parent] CreateRepositoryRequest parent - * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId - * @property {google.devtools.artifactregistry.v1beta2.IRepository|null} [repository] CreateRepositoryRequest repository + * @interface IGetPackageRequest + * @property {string|null} [name] GetPackageRequest name */ /** - * Constructs a new CreateRepositoryRequest. + * Constructs a new GetPackageRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a CreateRepositoryRequest. - * @implements ICreateRepositoryRequest + * @classdesc Represents a GetPackageRequest. + * @implements IGetPackageRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set */ - function CreateRepositoryRequest(properties) { + function GetPackageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5547,101 +5587,75 @@ } /** - * CreateRepositoryRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @instance - */ - CreateRepositoryRequest.prototype.parent = ""; - - /** - * CreateRepositoryRequest repositoryId. - * @member {string} repositoryId - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest - * @instance - */ - CreateRepositoryRequest.prototype.repositoryId = ""; - - /** - * CreateRepositoryRequest repository. - * @member {google.devtools.artifactregistry.v1beta2.IRepository|null|undefined} repository - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * GetPackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @instance */ - CreateRepositoryRequest.prototype.repository = null; + GetPackageRequest.prototype.name = ""; /** - * Creates a new CreateRepositoryRequest instance using the specified properties. + * Creates a new GetPackageRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest instance */ - CreateRepositoryRequest.create = function create(properties) { - return new CreateRepositoryRequest(properties); + GetPackageRequest.create = function create(properties) { + return new GetPackageRequest(properties); }; /** - * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. + * Encodes the specified GetPackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} message GetPackageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRepositoryRequest.encode = function encode(message, writer) { + GetPackageRequest.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.v1beta2.Repository.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. + * Encodes the specified GetPackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetPackageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} message GetPackageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetPackageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer. + * Decodes a GetPackageRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest * @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) { + 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.v1beta2.CreateRepositoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest(); 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.v1beta2.Repository.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -5652,130 +5666,107 @@ }; /** - * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPackageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest * @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) { + GetPackageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateRepositoryRequest message. + * Verifies a GetPackageRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @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) { + GetPackageRequest.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.v1beta2.Repository.verify(message.repository); - if (error) - return "repository." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPackageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.GetPackageRequest} GetPackageRequest */ - CreateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest) + GetPackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateRepositoryRequest.repository: object expected"); - message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repository); - } + var message = new $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetPackageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} message CreateRepositoryRequest + * @param {google.devtools.artifactregistry.v1beta2.GetPackageRequest} message GetPackageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateRepositoryRequest.toObject = function toObject(message, options) { + GetPackageRequest.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.v1beta2.Repository.toObject(message.repository, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateRepositoryRequest to JSON. + * Converts this GetPackageRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.GetPackageRequest * @instance * @returns {Object.} JSON object */ - CreateRepositoryRequest.prototype.toJSON = function toJSON() { + GetPackageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateRepositoryRequest; + return GetPackageRequest; })(); - v1beta2.UpdateRepositoryRequest = (function() { + v1beta2.DeletePackageRequest = (function() { /** - * Properties of an UpdateRepositoryRequest. + * Properties of a DeletePackageRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IUpdateRepositoryRequest - * @property {google.devtools.artifactregistry.v1beta2.IRepository|null} [repository] UpdateRepositoryRequest repository - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask + * @interface IDeletePackageRequest + * @property {string|null} [name] DeletePackageRequest name */ /** - * Constructs a new UpdateRepositoryRequest. + * Constructs a new DeletePackageRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an UpdateRepositoryRequest. - * @implements IUpdateRepositoryRequest + * @classdesc Represents a DeletePackageRequest. + * @implements IDeletePackageRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set */ - function UpdateRepositoryRequest(properties) { + function DeletePackageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5783,88 +5774,75 @@ } /** - * UpdateRepositoryRequest repository. - * @member {google.devtools.artifactregistry.v1beta2.IRepository|null|undefined} repository - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest - * @instance - */ - UpdateRepositoryRequest.prototype.repository = null; - - /** - * UpdateRepositoryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * DeletePackageRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @instance */ - UpdateRepositoryRequest.prototype.updateMask = null; + DeletePackageRequest.prototype.name = ""; /** - * Creates a new UpdateRepositoryRequest instance using the specified properties. + * Creates a new DeletePackageRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest instance */ - UpdateRepositoryRequest.create = function create(properties) { - return new UpdateRepositoryRequest(properties); + DeletePackageRequest.create = function create(properties) { + return new DeletePackageRequest(properties); }; /** - * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. + * Encodes the specified DeletePackageRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateRepositoryRequest.encode = function encode(message, writer) { + DeletePackageRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) - $root.google.devtools.artifactregistry.v1beta2.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(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. + * Encodes the specified DeletePackageRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeletePackageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} message DeletePackageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeletePackageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. + * Decodes a DeletePackageRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest * @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) { + 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.v1beta2.UpdateRepositoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -5875,126 +5853,115 @@ }; /** - * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePackageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest * @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) { + DeletePackageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateRepositoryRequest message. + * Verifies a DeletePackageRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @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) { + DeletePackageRequest.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.v1beta2.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; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePackageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} DeletePackageRequest */ - UpdateRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest) + DeletePackageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest(); - if (object.repository != null) { - if (typeof object.repository !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.repository: object expected"); - message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repository); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeletePackageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} message UpdateRepositoryRequest + * @param {google.devtools.artifactregistry.v1beta2.DeletePackageRequest} message DeletePackageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateRepositoryRequest.toObject = function toObject(message, options) { + DeletePackageRequest.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.v1beta2.Repository.toObject(message.repository, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateRepositoryRequest to JSON. + * Converts this DeletePackageRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeletePackageRequest * @instance * @returns {Object.} JSON object */ - UpdateRepositoryRequest.prototype.toJSON = function toJSON() { + DeletePackageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateRepositoryRequest; + return DeletePackageRequest; })(); - v1beta2.DeleteRepositoryRequest = (function() { + v1beta2.Repository = (function() { /** - * Properties of a DeleteRepositoryRequest. + * Properties of a Repository. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeleteRepositoryRequest - * @property {string|null} [name] DeleteRepositoryRequest name + * @interface IRepository + * @property {google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig|null} [mavenConfig] Repository mavenConfig + * @property {string|null} [name] Repository name + * @property {google.devtools.artifactregistry.v1beta2.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 DeleteRepositoryRequest. + * Constructs a new Repository. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeleteRepositoryRequest. - * @implements IDeleteRepositoryRequest + * @classdesc Represents a Repository. + * @implements IRepository * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set */ - function DeleteRepositoryRequest(properties) { + function Repository(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6002,76 +5969,201 @@ } /** - * DeleteRepositoryRequest name. + * Repository mavenConfig. + * @member {google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig|null|undefined} mavenConfig + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + Repository.prototype.mavenConfig = null; + + /** + * Repository name. * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @instance */ - DeleteRepositoryRequest.prototype.name = ""; + Repository.prototype.name = ""; /** - * Creates a new DeleteRepositoryRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest instance + * Repository format. + * @member {google.devtools.artifactregistry.v1beta2.Repository.Format} format + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance */ - DeleteRepositoryRequest.create = function create(properties) { - return new DeleteRepositoryRequest(properties); - }; + Repository.prototype.format = 0; /** - * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Repository description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance */ - DeleteRepositoryRequest.encode = function encode(message, writer) { + Repository.prototype.description = ""; + + /** + * Repository labels. + * @member {Object.} labels + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + Repository.prototype.labels = $util.emptyObject; + + /** + * Repository createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + Repository.prototype.createTime = null; + + /** + * Repository updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @instance + */ + Repository.prototype.updateTime = null; + + /** + * Repository kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.Repository + * @static + * @param {google.devtools.artifactregistry.v1beta2.IRepository=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository instance + */ + Repository.create = function create(properties) { + return new Repository(properties); + }; + + /** + * Encodes the specified Repository message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig.encode(message.mavenConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. + * Encodes the specified Repository message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Repository.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IRepository} message Repository message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + Repository.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. + * Decodes a Repository message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository * @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) { + 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.v1beta2.DeleteRepositoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.Repository(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 9: + message.mavenConfig = $root.google.devtools.artifactregistry.v1beta2.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; @@ -6081,898 +6173,1261 @@ }; /** - * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. + * Decodes a Repository message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository * @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) { + Repository.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteRepositoryRequest message. + * Verifies a Repository message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @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) { + 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.v1beta2.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 DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Repository message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest + * @returns {google.devtools.artifactregistry.v1beta2.Repository} Repository */ - DeleteRepositoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest) + Repository.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Repository) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest(); + var message = new $root.google.devtools.artifactregistry.v1beta2.Repository(); + if (object.mavenConfig != null) { + if (typeof object.mavenConfig !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.Repository.mavenConfig: object expected"); + message.mavenConfig = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 DeleteRepositoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a Repository message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @static - * @param {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} message DeleteRepositoryRequest + * @param {google.devtools.artifactregistry.v1beta2.Repository} message Repository * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteRepositoryRequest.toObject = function toObject(message, options) { + Repository.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + 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.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig.toObject(message.mavenConfig, options); + if (options.oneofs) + object.formatConfig = "mavenConfig"; + } return object; }; /** - * Converts this DeleteRepositoryRequest to JSON. + * Converts this Repository to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + * @memberof google.devtools.artifactregistry.v1beta2.Repository * @instance * @returns {Object.} JSON object */ - DeleteRepositoryRequest.prototype.toJSON = function toJSON() { + Repository.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteRepositoryRequest; - })(); + Repository.MavenRepositoryConfig = (function() { + + /** + * Properties of a MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @interface IMavenRepositoryConfig + * @property {boolean|null} [allowSnapshotOverwrites] MavenRepositoryConfig allowSnapshotOverwrites + * @property {google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy|null} [versionPolicy] MavenRepositoryConfig versionPolicy + */ + + /** + * Constructs a new MavenRepositoryConfig. + * @memberof google.devtools.artifactregistry.v1beta2.Repository + * @classdesc Represents a MavenRepositoryConfig. + * @implements IMavenRepositoryConfig + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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]]; + } - v1beta2.ArtifactRegistry = (function() { + /** + * MavenRepositoryConfig allowSnapshotOverwrites. + * @member {boolean} allowSnapshotOverwrites + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.allowSnapshotOverwrites = false; + + /** + * MavenRepositoryConfig versionPolicy. + * @member {google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy} versionPolicy + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @instance + */ + MavenRepositoryConfig.prototype.versionPolicy = 0; + + /** + * Creates a new MavenRepositoryConfig instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1beta2.Repository.IMavenRepositoryConfig=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig} MavenRepositoryConfig + */ + MavenRepositoryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy[message.versionPolicy] : message.versionPolicy; + return object; + }; + + /** + * Converts this MavenRepositoryConfig to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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; + })(); /** - * Constructs a new ArtifactRegistry service. - * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * Format enum. + * @name google.devtools.artifactregistry.v1beta2.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 */ - function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + 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; + })(); - (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; + return Repository; + })(); - /** - * Creates new ArtifactRegistry service using the specified rpc implementation. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.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); - }; + v1beta2.ListRepositoriesRequest = (function() { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listRepositories}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef ListRepositoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} [response] ListRepositoriesResponse + * Properties of a ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListRepositoriesRequest + * @property {string|null} [parent] ListRepositoriesRequest parent + * @property {number|null} [pageSize] ListRepositoriesRequest pageSize + * @property {string|null} [pageToken] ListRepositoriesRequest pageToken */ /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse - * @returns {undefined} - * @variation 1 + * Constructs a new ListRepositoriesRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListRepositoriesRequest. + * @implements IListRepositoriesRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest=} [properties] Properties to set */ - Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { - return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse, request, callback); - }, "name", { value: "ListRepositories" }); + 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]]; + } /** - * Calls ListRepositories. - * @function listRepositories - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * ListRepositoriesRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getRepository}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef GetRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Repository} [response] Repository */ + ListRepositoriesRequest.prototype.parent = ""; /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * ListRepositoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1beta2.Repository, request, callback); - }, "name", { value: "GetRepository" }); + ListRepositoriesRequest.prototype.pageSize = 0; /** - * Calls GetRepository. - * @function getRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * ListRepositoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListRepositoriesRequest.prototype.pageToken = ""; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createRepository}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef CreateRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new ListRepositoriesRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest instance */ + ListRepositoriesRequest.create = function create(properties) { + return new ListRepositoriesRequest(properties); + }; /** - * Calls CreateRepository. - * @function createRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ListRepositoriesRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} message ListRepositoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ArtifactRegistry.prototype.createRepository = function createRepository(request, callback) { - return this.rpcCall(createRepository, $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRepository" }); + 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; + }; /** - * Calls CreateRepository. - * @function createRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListRepositoriesRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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(); + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateRepository}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef UpdateRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Repository} [response] Repository - */ - - /** - * Calls UpdateRepository. - * @function updateRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateRepositoryRequest, $root.google.devtools.artifactregistry.v1beta2.Repository, request, callback); - }, "name", { value: "UpdateRepository" }); - - /** - * Calls UpdateRepository. - * @function updateRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListRepositoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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; + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteRepository}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef DeleteRepositoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a ListRepositoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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()); + }; /** - * Calls DeleteRepository. - * @function deleteRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a ListRepositoriesRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ArtifactRegistry.prototype.deleteRepository = function deleteRepository(request, callback) { - return this.rpcCall(deleteRepository, $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteRepository" }); + 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; + }; /** - * Calls DeleteRepository. - * @function deleteRepository - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListRepositoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest} ListRepositoriesRequest */ + ListRepositoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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; + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listPackages}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef ListPackagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} [response] ListPackagesResponse + * Creates a plain object from a ListRepositoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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; + }; /** - * Calls ListPackages. - * @function listPackages - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * Converts this ListRepositoriesRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} request ListPackagesRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackagesCallback} callback Node-style callback called with the error, if any, and ListPackagesResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ArtifactRegistry.prototype.listPackages = function listPackages(request, callback) { - return this.rpcCall(listPackages, $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest, $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse, request, callback); - }, "name", { value: "ListPackages" }); + ListRepositoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListPackages. - * @function listPackages - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} request ListPackagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return ListRepositoriesRequest; + })(); + + v1beta2.ListRepositoriesResponse = (function() { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getPackage}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef GetPackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Package} [response] Package + * Properties of a ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListRepositoriesResponse + * @property {Array.|null} [repositories] ListRepositoriesResponse repositories + * @property {string|null} [nextPageToken] ListRepositoriesResponse nextPageToken */ /** - * Calls GetPackage. - * @function getPackage - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} request GetPackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackageCallback} callback Node-style callback called with the error, if any, and Package - * @returns {undefined} - * @variation 1 + * Constructs a new ListRepositoriesResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListRepositoriesResponse. + * @implements IListRepositoriesResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse=} [properties] Properties to set */ - Object.defineProperty(ArtifactRegistry.prototype.getPackage = function getPackage(request, callback) { - return this.rpcCall(getPackage, $root.google.devtools.artifactregistry.v1beta2.GetPackageRequest, $root.google.devtools.artifactregistry.v1beta2.Package, request, callback); - }, "name", { value: "GetPackage" }); + 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]]; + } /** - * Calls GetPackage. - * @function getPackage - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * ListRepositoriesResponse repositories. + * @member {Array.} repositories + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} request GetPackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListRepositoriesResponse.prototype.repositories = $util.emptyArray; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deletePackage}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef DeletePackageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListRepositoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @instance */ + ListRepositoriesResponse.prototype.nextPageToken = ""; /** - * Calls DeletePackage. - * @function deletePackage - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} request DeletePackageRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackageCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a new ListRepositoriesResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse instance */ - Object.defineProperty(ArtifactRegistry.prototype.deletePackage = function deletePackage(request, callback) { - return this.rpcCall(deletePackage, $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeletePackage" }); + ListRepositoriesResponse.create = function create(properties) { + return new ListRepositoriesResponse(properties); + }; /** - * Calls DeletePackage. - * @function deletePackage - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} request DeletePackageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListRepositoriesResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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; + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listVersions}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef ListVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} [response] ListVersionsResponse + * Encodes the specified ListRepositoriesResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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(); + }; /** - * Calls ListVersions. - * @function listVersions - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} request ListVersionsRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse - * @returns {undefined} - * @variation 1 + * Decodes a ListRepositoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse + * @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.listVersions = function listVersions(request, callback) { - return this.rpcCall(listVersions, $root.google.devtools.artifactregistry.v1beta2.ListVersionsRequest, $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse, request, callback); - }, "name", { value: "ListVersions" }); + 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.v1beta2.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.v1beta2.Repository.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListVersions. - * @function listVersions - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} request ListVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListRepositoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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()); + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getVersion}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef GetVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Version} [response] Version + * Verifies a ListRepositoriesResponse message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListRepositoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} ListRepositoriesResponse */ + ListRepositoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse(); + if (object.repositories) { + if (!Array.isArray(object.repositories)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListRepositoriesResponse.repositories: object expected"); + message.repositories[i] = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repositories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Calls GetVersion. - * @function getVersion - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} request GetVersionRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and Version - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListRepositoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} message ListRepositoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ArtifactRegistry.prototype.getVersion = function getVersion(request, callback) { - return this.rpcCall(getVersion, $root.google.devtools.artifactregistry.v1beta2.GetVersionRequest, $root.google.devtools.artifactregistry.v1beta2.Version, request, callback); - }, "name", { value: "GetVersion" }); + 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.v1beta2.Repository.toObject(message.repositories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls GetVersion. - * @function getVersion - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * Converts this ListRepositoriesResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} request GetVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListRepositoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListRepositoriesResponse; + })(); + + v1beta2.GetRepositoryRequest = (function() { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteVersion}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef DeleteVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetRepositoryRequest + * @property {string|null} [name] GetRepositoryRequest name */ /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new GetRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetRepositoryRequest. + * @implements IGetRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest=} [properties] Properties to set */ - Object.defineProperty(ArtifactRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { - return this.rpcCall(deleteVersion, $root.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteVersion" }); + 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]]; + } /** - * Calls DeleteVersion. - * @function deleteVersion - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * GetRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetRepositoryRequest.prototype.name = ""; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listFiles}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef ListFilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} [response] ListFilesResponse + * Creates a new GetRepositoryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest instance */ + GetRepositoryRequest.create = function create(properties) { + return new GetRepositoryRequest(properties); + }; /** - * Calls ListFiles. - * @function listFiles - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} request ListFilesRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFilesCallback} callback Node-style callback called with the error, if any, and ListFilesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} message GetRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ArtifactRegistry.prototype.listFiles = function listFiles(request, callback) { - return this.rpcCall(listFiles, $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest, $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse, request, callback); - }, "name", { value: "ListFiles" }); + 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; + }; /** - * Calls ListFiles. - * @function listFiles - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} request ListFilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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(); + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getFile}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef GetFileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.File} [response] File + * Decodes a GetRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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; + }; /** - * Calls GetFile. - * @function getFile - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} request GetFileRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFileCallback} callback Node-style callback called with the error, if any, and File - * @returns {undefined} - * @variation 1 + * Decodes a GetRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest + * @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.getFile = function getFile(request, callback) { - return this.rpcCall(getFile, $root.google.devtools.artifactregistry.v1beta2.GetFileRequest, $root.google.devtools.artifactregistry.v1beta2.File, request, callback); - }, "name", { value: "GetFile" }); + GetRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetFile. - * @function getFile - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} request GetFileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetRepositoryRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.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; + }; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listTags}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef ListTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.ListTagsResponse} [response] ListTagsResponse + * Creates a GetRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} GetRepositoryRequest */ + GetRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls ListTags. - * @function listTags - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} request ListTagsRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.GetRepositoryRequest} message GetRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ArtifactRegistry.prototype.listTags = function listTags(request, callback) { - return this.rpcCall(listTags, $root.google.devtools.artifactregistry.v1beta2.ListTagsRequest, $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse, request, callback); - }, "name", { value: "ListTags" }); + 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; + }; /** - * Calls ListTags. - * @function listTags - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * Converts this GetRepositoryRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetRepositoryRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} request ListTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetRepositoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRepositoryRequest; + })(); + + v1beta2.CreateRepositoryRequest = (function() { /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getTag}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef GetTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag + * Properties of a CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface ICreateRepositoryRequest + * @property {string|null} [parent] CreateRepositoryRequest parent + * @property {string|null} [repositoryId] CreateRepositoryRequest repositoryId + * @property {google.devtools.artifactregistry.v1beta2.IRepository|null} [repository] CreateRepositoryRequest repository */ /** - * Calls GetTag. - * @function getTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} request GetTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 + * Constructs a new CreateRepositoryRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a CreateRepositoryRequest. + * @implements ICreateRepositoryRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set */ - Object.defineProperty(ArtifactRegistry.prototype.getTag = function getTag(request, callback) { - return this.rpcCall(getTag, $root.google.devtools.artifactregistry.v1beta2.GetTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); - }, "name", { value: "GetTag" }); + 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]]; + } /** - * Calls GetTag. - * @function getTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * CreateRepositoryRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @instance - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} request GetTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateRepositoryRequest.prototype.parent = ""; /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createTag}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef CreateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag + * CreateRepositoryRequest repositoryId. + * @member {string} repositoryId + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + * @instance */ + CreateRepositoryRequest.prototype.repositoryId = ""; /** - * Calls CreateTag. - * @function createTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} request CreateTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); - }, "name", { value: "CreateTag" }); - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} request CreateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateTag}. - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @typedef UpdateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag - */ - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); - }, "name", { value: "UpdateTag" }); - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteTag}. - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTag" }); - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry - * @instance - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#setIamPolicy}. - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistry#getIamPolicy}. - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistry#testIamPermissions}. - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry + * CreateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1beta2.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ArtifactRegistry; - })(); - - v1beta2.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IOperationMetadata - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.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]]; - } + CreateRepositoryRequest.prototype.repository = null; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new CreateRepositoryRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata instance + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + CreateRepositoryRequest.create = function create(properties) { + return new CreateRepositoryRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, 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.v1beta2.Repository.encode(message.repository, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} message CreateRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a CreateRepositoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.OperationMetadata} OperationMetadata + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest * @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) { + 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.v1beta2.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.Repository.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -6982,95 +7437,130 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateRepositoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest * @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) { + CreateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a CreateRepositoryRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @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) { + 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.v1beta2.Repository.verify(message.repository); + if (error) + return "repository." + error; + } return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateRepositoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata + * @returns {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} CreateRepositoryRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.OperationMetadata) + CreateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest) return object; - return new $root.google.devtools.artifactregistry.v1beta2.OperationMetadata(); + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repository); + } + return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateRepositoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.OperationMetadata} message OperationMetadata + * @param {google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest} message CreateRepositoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject() { - return {}; + 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.v1beta2.Repository.toObject(message.repository, options); + return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this CreateRepositoryRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata + * @memberof google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + CreateRepositoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OperationMetadata; + return CreateRepositoryRequest; })(); - v1beta2.Tag = (function() { + v1beta2.UpdateRepositoryRequest = (function() { /** - * Properties of a Tag. + * Properties of an UpdateRepositoryRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [version] Tag version + * @interface IUpdateRepositoryRequest + * @property {google.devtools.artifactregistry.v1beta2.IRepository|null} [repository] UpdateRepositoryRequest repository + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateRepositoryRequest updateMask */ /** - * Constructs a new Tag. + * Constructs a new UpdateRepositoryRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Tag. - * @implements ITag + * @classdesc Represents an UpdateRepositoryRequest. + * @implements IUpdateRepositoryRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set */ - function Tag(properties) { + function UpdateRepositoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7078,88 +7568,88 @@ } /** - * Tag name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * UpdateRepositoryRequest repository. + * @member {google.devtools.artifactregistry.v1beta2.IRepository|null|undefined} repository + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @instance */ - Tag.prototype.name = ""; + UpdateRepositoryRequest.prototype.repository = null; /** - * Tag version. - * @member {string} version - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * UpdateRepositoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @instance */ - Tag.prototype.version = ""; + UpdateRepositoryRequest.prototype.updateMask = null; /** - * Creates a new Tag instance using the specified properties. + * Creates a new UpdateRepositoryRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest instance */ - Tag.create = function create(properties) { - return new Tag(properties); + UpdateRepositoryRequest.create = function create(properties) { + return new UpdateRepositoryRequest(properties); }; /** - * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * Encodes the specified UpdateRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ITag} message Tag message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tag.encode = function encode(message, writer) { + UpdateRepositoryRequest.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); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + $root.google.devtools.artifactregistry.v1beta2.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 Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. + * Encodes the specified UpdateRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ITag} message Tag message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} message UpdateRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { + UpdateRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Tag message from the specified reader or buffer. + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.Tag} Tag + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest * @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) { + 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.v1beta2.Tag(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.decode(reader, reader.uint32()); break; case 2: - message.version = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7170,119 +7660,126 @@ }; /** - * Decodes a Tag message from the specified reader or buffer, length delimited. + * Decodes an UpdateRepositoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest * @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) { + UpdateRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Tag message. + * Verifies an UpdateRepositoryRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @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) { + UpdateRepositoryRequest.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"; + if (message.repository != null && message.hasOwnProperty("repository")) { + var error = $root.google.devtools.artifactregistry.v1beta2.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 a Tag message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateRepositoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag + * @returns {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} UpdateRepositoryRequest */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Tag) + UpdateRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.Tag(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); + var message = new $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest(); + if (object.repository != null) { + if (typeof object.repository !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.repository: object expected"); + message.repository = $root.google.devtools.artifactregistry.v1beta2.Repository.fromObject(object.repository); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. + * Creates a plain object from an UpdateRepositoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.Tag} message Tag + * @param {google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest} message UpdateRepositoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Tag.toObject = function toObject(message, options) { + UpdateRepositoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.version = ""; + object.repository = null; + object.updateMask = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = $root.google.devtools.artifactregistry.v1beta2.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 Tag to JSON. + * Converts this UpdateRepositoryRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest * @instance * @returns {Object.} JSON object */ - Tag.prototype.toJSON = function toJSON() { + UpdateRepositoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Tag; + return UpdateRepositoryRequest; })(); - v1beta2.ListTagsRequest = (function() { + v1beta2.DeleteRepositoryRequest = (function() { /** - * Properties of a ListTagsRequest. + * Properties of a DeleteRepositoryRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * @interface IDeleteRepositoryRequest + * @property {string|null} [name] DeleteRepositoryRequest name */ /** - * Constructs a new ListTagsRequest. + * Constructs a new DeleteRepositoryRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListTagsRequest. - * @implements IListTagsRequest + * @classdesc Represents a DeleteRepositoryRequest. + * @implements IDeleteRepositoryRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set */ - function ListTagsRequest(properties) { + function DeleteRepositoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7290,114 +7787,75 @@ } /** - * ListTagsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.parent = ""; - - /** - * ListTagsRequest filter. - * @member {string} filter - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.filter = ""; - - /** - * ListTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageSize = 0; - - /** - * ListTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * DeleteRepositoryRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @instance */ - ListTagsRequest.prototype.pageToken = ""; + DeleteRepositoryRequest.prototype.name = ""; /** - * Creates a new ListTagsRequest instance using the specified properties. + * Creates a new DeleteRepositoryRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsRequest} ListTagsRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest instance */ - ListTagsRequest.create = function create(properties) { - return new ListTagsRequest(properties); + DeleteRepositoryRequest.create = function create(properties) { + return new DeleteRepositoryRequest(properties); }; /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * Encodes the specified DeleteRepositoryRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsRequest.encode = function encode(message, writer) { + DeleteRepositoryRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * Encodes the specified DeleteRepositoryRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} message ListTagsRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} message DeleteRepositoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteRepositoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTagsRequest message from the specified reader or buffer. + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsRequest} ListTagsRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest * @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) { + 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.v1beta2.ListTagsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest(); 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(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -7408,1331 +7866,1030 @@ }; /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteRepositoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsRequest} ListTagsRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest * @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) { + DeleteRepositoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTagsRequest message. + * Verifies a DeleteRepositoryRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @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) { + DeleteRepositoryRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteRepositoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsRequest} ListTagsRequest + * @returns {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} DeleteRepositoryRequest */ - ListTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListTagsRequest) + DeleteRepositoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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); + var message = new $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteRepositoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ListTagsRequest} message ListTagsRequest + * @param {google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest} message DeleteRepositoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTagsRequest.toObject = function toObject(message, options) { + DeleteRepositoryRequest.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; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListTagsRequest to JSON. + * Converts this DeleteRepositoryRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @memberof google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest * @instance * @returns {Object.} JSON object */ - ListTagsRequest.prototype.toJSON = function toJSON() { + DeleteRepositoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTagsRequest; + return DeleteRepositoryRequest; })(); - v1beta2.ListTagsResponse = (function() { - - /** - * Properties of a ListTagsResponse. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListTagsResponse - * @property {Array.|null} [tags] ListTagsResponse tags - * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken - */ + v1beta2.ArtifactRegistry = (function() { /** - * Constructs a new ListTagsResponse. + * Constructs a new ArtifactRegistry service. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListTagsResponse. - * @implements IListTagsResponse + * @classdesc Represents an ArtifactRegistry + * @extends $protobuf.rpc.Service * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListTagsResponse=} [properties] Properties to set + * @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 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]]; + function ArtifactRegistry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (ArtifactRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ArtifactRegistry; + /** - * ListTagsResponse tags. - * @member {Array.} tags - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @instance + * Creates new ArtifactRegistry service using the specified rpc implementation. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.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. */ - ListTagsResponse.prototype.tags = $util.emptyArray; + ArtifactRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @instance + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#importAptArtifacts}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ImportAptArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListTagsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListTagsResponse instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsResponse} ListTagsResponse instance - */ - ListTagsResponse.create = function create(properties) { - return new ListTagsResponse(properties); - }; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - 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.v1beta2.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; - }; + Object.defineProperty(ArtifactRegistry.prototype.importAptArtifacts = function importAptArtifacts(request, callback) { + return this.rpcCall(importAptArtifacts, $root.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportAptArtifacts" }); /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ImportAptArtifacts. + * @function importAptArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest} request ImportAptArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.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.v1beta2.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#importYumArtifacts}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ImportYumArtifactsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - 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.v1beta2.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.v1beta2.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.v1beta2.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifactsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ArtifactRegistry.prototype.importYumArtifacts = function importYumArtifacts(request, callback) { + return this.rpcCall(importYumArtifacts, $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportYumArtifacts" }); /** - * Verifies a ListTagsResponse message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ImportYumArtifacts. + * @function importYumArtifacts + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest} request ImportYumArtifactsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.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.v1beta2.ListTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListTagsResponse} ListTagsResponse + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listRepositories}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ListRepositoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse} [response] ListRepositoriesResponse */ - ListTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsResponse.tags: object expected"); - message.tags[i] = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsResponse - * @static - * @param {google.devtools.artifactregistry.v1beta2.ListTagsResponse} message ListTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositoriesCallback} callback Node-style callback called with the error, if any, and ListRepositoriesResponse + * @returns {undefined} + * @variation 1 */ - 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.v1beta2.Tag.toObject(message.tags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + Object.defineProperty(ArtifactRegistry.prototype.listRepositories = function listRepositories(request, callback) { + return this.rpcCall(listRepositories, $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest, $root.google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse, request, callback); + }, "name", { value: "ListRepositories" }); /** - * Converts this ListTagsResponse to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * Calls ListRepositories. + * @function listRepositories + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance - * @returns {Object.} JSON object + * @param {google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest} request ListRepositoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListTagsResponse; - })(); - - v1beta2.GetTagRequest = (function() { /** - * Properties of a GetTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetTagRequest - * @property {string|null} [name] GetTagRequest name + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getRepository}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Repository} [response] Repository */ /** - * Constructs a new GetTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetTagRequest. - * @implements IGetTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest=} [properties] Properties to set + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 */ - 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]]; - } + Object.defineProperty(ArtifactRegistry.prototype.getRepository = function getRepository(request, callback) { + return this.rpcCall(getRepository, $root.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest, $root.google.devtools.artifactregistry.v1beta2.Repository, request, callback); + }, "name", { value: "GetRepository" }); /** - * GetTagRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * Calls GetRepository. + * @function getRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetRepositoryRequest} request GetRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTagRequest.prototype.name = ""; /** - * Creates a new GetTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetTagRequest} GetTagRequest instance + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createRepository}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef CreateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetTagRequest.create = function create(properties) { - return new GetTagRequest(properties); - }; /** - * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} message GetTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(ArtifactRegistry.prototype.createRepository = function createRepository(request, callback) { + return this.rpcCall(createRepository, $root.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRepository" }); /** - * Encodes the specified GetTagRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} message GetTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateRepository. + * @function createRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.ICreateRepositoryRequest} request CreateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.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.v1beta2.GetTagRequest} GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateRepository}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef UpdateRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Repository} [response] Repository */ - 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.v1beta2.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.v1beta2.GetTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.GetTagRequest} GetTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepositoryCallback} callback Node-style callback called with the error, if any, and Repository + * @returns {undefined} + * @variation 1 */ - GetTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ArtifactRegistry.prototype.updateRepository = function updateRepository(request, callback) { + return this.rpcCall(updateRepository, $root.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest, $root.google.devtools.artifactregistry.v1beta2.Repository, request, callback); + }, "name", { value: "UpdateRepository" }); /** - * Verifies a GetTagRequest message. - * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateRepository. + * @function updateRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateRepositoryRequest} request UpdateRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.GetTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetTagRequest} GetTagRequest + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteRepository}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef DeleteRepositoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.GetTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.GetTagRequest} message GetTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepositoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(ArtifactRegistry.prototype.deleteRepository = function deleteRepository(request, callback) { + return this.rpcCall(deleteRepository, $root.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteRepository" }); /** - * Converts this GetTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * Calls DeleteRepository. + * @function deleteRepository + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance - * @returns {Object.} JSON object + * @param {google.devtools.artifactregistry.v1beta2.IDeleteRepositoryRequest} request DeleteRepositoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTagRequest; - })(); - - v1beta2.CreateTagRequest = (function() { /** - * Properties of a CreateTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface ICreateTagRequest - * @property {string|null} [parent] CreateTagRequest parent - * @property {string|null} [tagId] CreateTagRequest tagId - * @property {google.devtools.artifactregistry.v1beta2.ITag|null} [tag] CreateTagRequest tag + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listPackages}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ListPackagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ListPackagesResponse} [response] ListPackagesResponse */ /** - * Constructs a new CreateTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a CreateTagRequest. - * @implements ICreateTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest=} [properties] Properties to set + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} request ListPackagesRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackagesCallback} callback Node-style callback called with the error, if any, and ListPackagesResponse + * @returns {undefined} + * @variation 1 */ - 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]]; - } + Object.defineProperty(ArtifactRegistry.prototype.listPackages = function listPackages(request, callback) { + return this.rpcCall(listPackages, $root.google.devtools.artifactregistry.v1beta2.ListPackagesRequest, $root.google.devtools.artifactregistry.v1beta2.ListPackagesResponse, request, callback); + }, "name", { value: "ListPackages" }); /** - * CreateTagRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * Calls ListPackages. + * @function listPackages + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListPackagesRequest} request ListPackagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateTagRequest.prototype.parent = ""; /** - * CreateTagRequest tagId. - * @member {string} tagId - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @instance + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getPackage}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetPackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Package} [response] Package */ - CreateTagRequest.prototype.tagId = ""; /** - * CreateTagRequest tag. - * @member {google.devtools.artifactregistry.v1beta2.ITag|null|undefined} tag - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.tag = null; + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} request GetPackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetPackageRequest, $root.google.devtools.artifactregistry.v1beta2.Package, request, callback); + }, "name", { value: "GetPackage" }); /** - * Creates a new CreateTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.CreateTagRequest} CreateTagRequest instance + * Calls GetPackage. + * @function getPackage + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetPackageRequest} request GetPackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateTagRequest.create = function create(properties) { - return new CreateTagRequest(properties); - }; /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deletePackage}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef DeletePackageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - 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.v1beta2.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.v1beta2.CreateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackageCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ArtifactRegistry.prototype.deletePackage = function deletePackage(request, callback) { + return this.rpcCall(deletePackage, $root.google.devtools.artifactregistry.v1beta2.DeletePackageRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePackage" }); /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePackage. + * @function deletePackage + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeletePackageRequest} request DeletePackageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.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.v1beta2.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.v1beta2.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listVersions}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} [response] ListVersionsResponse */ - 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.v1beta2.CreateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @returns {undefined} + * @variation 1 */ - 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.v1beta2.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - return null; - }; + Object.defineProperty(ArtifactRegistry.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.devtools.artifactregistry.v1beta2.ListVersionsRequest, $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse, request, callback); + }, "name", { value: "ListVersions" }); /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.CreateTagRequest} CreateTagRequest + * Calls ListVersions. + * @function listVersions + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest.tag: object expected"); - message.tag = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.CreateTagRequest} message CreateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getVersion}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Version} [response] Version */ - 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.v1beta2.Tag.toObject(message.tag, options); - return object; - }; /** - * Converts this CreateTagRequest to JSON. - * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance - * @returns {Object.} JSON object + * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 */ - CreateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateTagRequest; - })(); + Object.defineProperty(ArtifactRegistry.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.devtools.artifactregistry.v1beta2.GetVersionRequest, $root.google.devtools.artifactregistry.v1beta2.Version, request, callback); + }, "name", { value: "GetVersion" }); - v1beta2.UpdateTagRequest = (function() { + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of an UpdateTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IUpdateTagRequest - * @property {google.devtools.artifactregistry.v1beta2.ITag|null} [tag] UpdateTagRequest tag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteVersion}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new UpdateTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents an UpdateTagRequest. - * @implements IUpdateTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest=} [properties] Properties to set + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - 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]]; - } + Object.defineProperty(ArtifactRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVersion" }); /** - * UpdateTagRequest tag. - * @member {google.devtools.artifactregistry.v1beta2.ITag|null|undefined} tag - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagRequest.prototype.tag = null; /** - * UpdateTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listFiles}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ListFilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ListFilesResponse} [response] ListFilesResponse + */ + + /** + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} request ListFilesRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFilesCallback} callback Node-style callback called with the error, if any, and ListFilesResponse + * @returns {undefined} + * @variation 1 */ - UpdateTagRequest.prototype.updateMask = null; + Object.defineProperty(ArtifactRegistry.prototype.listFiles = function listFiles(request, callback) { + return this.rpcCall(listFiles, $root.google.devtools.artifactregistry.v1beta2.ListFilesRequest, $root.google.devtools.artifactregistry.v1beta2.ListFilesResponse, request, callback); + }, "name", { value: "ListFiles" }); /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} UpdateTagRequest instance + * Calls ListFiles. + * @function listFiles + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListFilesRequest} request ListFilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagRequest.create = function create(properties) { - return new UpdateTagRequest(properties); - }; /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getFile}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.File} [response] File */ - UpdateTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} request GetFileRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFileCallback} callback Node-style callback called with the error, if any, and File + * @returns {undefined} + * @variation 1 */ - UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ArtifactRegistry.prototype.getFile = function getFile(request, callback) { + return this.rpcCall(getFile, $root.google.devtools.artifactregistry.v1beta2.GetFileRequest, $root.google.devtools.artifactregistry.v1beta2.File, request, callback); + }, "name", { value: "GetFile" }); /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFile. + * @function getFile + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetFileRequest} request GetFileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.UpdateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tag = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#listTags}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef ListTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ListTagsResponse} [response] ListTagsResponse */ - 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.v1beta2.UpdateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} request ListTagsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse + * @returns {undefined} + * @variation 1 */ - 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.v1beta2.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; - }; + Object.defineProperty(ArtifactRegistry.prototype.listTags = function listTags(request, callback) { + return this.rpcCall(listTags, $root.google.devtools.artifactregistry.v1beta2.ListTagsRequest, $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse, request, callback); + }, "name", { value: "ListTags" }); /** - * Creates an UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} UpdateTagRequest + * Calls ListTags. + * @function listTags + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest} request ListTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.UpdateTagRequest(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateTagRequest.tag: object expected"); - message.tag = $root.google.devtools.artifactregistry.v1beta2.Tag.fromObject(object.tag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} message UpdateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getTag}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag */ - 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.v1beta2.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.v1beta2.UpdateTagRequest + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance - * @returns {Object.} JSON object + * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} request GetTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 */ - UpdateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateTagRequest; - })(); - - v1beta2.DeleteTagRequest = (function() { + Object.defineProperty(ArtifactRegistry.prototype.getTag = function getTag(request, callback) { + return this.rpcCall(getTag, $root.google.devtools.artifactregistry.v1beta2.GetTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); + }, "name", { value: "GetTag" }); /** - * Properties of a DeleteTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeleteTagRequest - * @property {string|null} [name] DeleteTagRequest name + * Calls GetTag. + * @function getTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest} request GetTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new DeleteTagRequest. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeleteTagRequest. - * @implements IDeleteTagRequest - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest=} [properties] Properties to set + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#createTag}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef CreateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag */ - 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.v1beta2.DeleteTagRequest + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} request CreateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 */ - DeleteTagRequest.prototype.name = ""; + Object.defineProperty(ArtifactRegistry.prototype.createTag = function createTag(request, callback) { + return this.rpcCall(createTag, $root.google.devtools.artifactregistry.v1beta2.CreateTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); + }, "name", { value: "CreateTag" }); /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @function create - * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} DeleteTagRequest instance + * Calls CreateTag. + * @function createTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest} request CreateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteTagRequest.create = function create(properties) { - return new DeleteTagRequest(properties); - }; /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteTagRequest.verify|verify} messages. - * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateTag}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef UpdateTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.Tag} [response] Tag */ - 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.v1beta2.DeleteTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag + * @returns {undefined} + * @variation 1 */ - DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ArtifactRegistry.prototype.updateTag = function updateTag(request, callback) { + return this.rpcCall(updateTag, $root.google.devtools.artifactregistry.v1beta2.UpdateTagRequest, $root.google.devtools.artifactregistry.v1beta2.Tag, request, callback); + }, "name", { value: "UpdateTag" }); /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTag. + * @function updateTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest} request UpdateTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.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.v1beta2.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#deleteTag}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef DeleteTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - 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.v1beta2.DeleteTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(ArtifactRegistry.prototype.deleteTag = function deleteTag(request, callback) { + return this.rpcCall(deleteTag, $root.google.devtools.artifactregistry.v1beta2.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTag" }); /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} DeleteTagRequest + * Calls DeleteTag. + * @function deleteTag + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest} request DeleteTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteTagRequest) - return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest - * @static - * @param {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} message DeleteTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#setIamPolicy}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy */ - 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.v1beta2.DeleteTagRequest + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance - * @returns {Object.} JSON object + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 */ - DeleteTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + 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" }); - return DeleteTagRequest; - })(); + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - v1beta2.Version = (function() { + /** + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getIamPolicy}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ /** - * Properties of a Version. - * @memberof google.devtools.artifactregistry.v1beta2 - * @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 + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.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" }); /** - * Constructs a new Version. - * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IVersion=} [properties] Properties to set + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v1beta2.Version + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#testIamPermissions}. + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistry * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - Version.prototype.name = ""; + 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" }); /** - * Version description. - * @member {string} description - * @memberof google.devtools.artifactregistry.v1beta2.Version + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Version.prototype.description = ""; /** - * Version createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.artifactregistry.v1beta2.Version + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#getProjectSettings}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef GetProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 */ - Version.prototype.createTime = null; + Object.defineProperty(ArtifactRegistry.prototype.getProjectSettings = function getProjectSettings(request, callback) { + return this.rpcCall(getProjectSettings, $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest, $root.google.devtools.artifactregistry.v1beta2.ProjectSettings, request, callback); + }, "name", { value: "GetProjectSettings" }); /** - * Version updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.devtools.artifactregistry.v1beta2.Version + * Calls GetProjectSettings. + * @function getProjectSettings + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest} request GetProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Version.prototype.updateTime = null; /** - * Version relatedTags. - * @member {Array.} relatedTags - * @memberof google.devtools.artifactregistry.v1beta2.Version + * Callback as used by {@link google.devtools.artifactregistry.v1beta2.ArtifactRegistry#updateProjectSettings}. + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @typedef UpdateProjectSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.artifactregistry.v1beta2.ProjectSettings} [response] ProjectSettings + */ + + /** + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @param {google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettingsCallback} callback Node-style callback called with the error, if any, and ProjectSettings + * @returns {undefined} + * @variation 1 */ - Version.prototype.relatedTags = $util.emptyArray; + Object.defineProperty(ArtifactRegistry.prototype.updateProjectSettings = function updateProjectSettings(request, callback) { + return this.rpcCall(updateProjectSettings, $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest, $root.google.devtools.artifactregistry.v1beta2.ProjectSettings, request, callback); + }, "name", { value: "UpdateProjectSettings" }); /** - * Creates a new Version instance using the specified properties. + * Calls UpdateProjectSettings. + * @function updateProjectSettings + * @memberof google.devtools.artifactregistry.v1beta2.ArtifactRegistry + * @instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest} request UpdateProjectSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ArtifactRegistry; + })(); + + v1beta2.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IOperationMetadata + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IVersion=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.Version} Version instance + * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata instance */ - Version.create = function create(properties) { - return new Version(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Version.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IVersion} message Version message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encode = function encode(message, writer) { + OperationMetadata.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.v1beta2.Tag.encode(message.relatedTags[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Version.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.IVersion} message Version message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.Version} Version + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata * @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) { + 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.v1beta2.Version(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.OperationMetadata(); 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.v1beta2.Tag.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -8742,187 +8899,95 @@ }; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.Version} Version + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata * @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) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Version message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @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) { + OperationMetadata.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.v1beta2.Tag.verify(message.relatedTags[i]); - if (error) - return "relatedTags." + error; - } - } return null; }; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.Version} Version + * @returns {google.devtools.artifactregistry.v1beta2.OperationMetadata} OperationMetadata */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Version) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.OperationMetadata) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Version.relatedTags: object expected"); - message.relatedTags[i] = $root.google.devtools.artifactregistry.v1beta2.Tag.fromObject(object.relatedTags[i]); - } - } - return message; + return new $root.google.devtools.artifactregistry.v1beta2.OperationMetadata(); }; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @static - * @param {google.devtools.artifactregistry.v1beta2.Version} message Version + * @param {google.devtools.artifactregistry.v1beta2.OperationMetadata} message OperationMetadata * @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; - } - 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.v1beta2.Tag.toObject(message.relatedTags[j], options); - } - return object; + OperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this Version to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.Version + * @memberof google.devtools.artifactregistry.v1beta2.OperationMetadata * @instance * @returns {Object.} JSON object */ - Version.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Version; - })(); - - /** - * VersionView enum. - * @name google.devtools.artifactregistry.v1beta2.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 - */ - v1beta2.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; + return OperationMetadata; })(); - v1beta2.ListVersionsRequest = (function() { + v1beta2.ProjectSettings = (function() { /** - * Properties of a ListVersionsRequest. + * Properties of a ProjectSettings. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListVersionsRequest - * @property {string|null} [parent] ListVersionsRequest parent - * @property {number|null} [pageSize] ListVersionsRequest pageSize - * @property {string|null} [pageToken] ListVersionsRequest pageToken - * @property {google.devtools.artifactregistry.v1beta2.VersionView|null} [view] ListVersionsRequest view + * @interface IProjectSettings + * @property {string|null} [name] ProjectSettings name + * @property {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState|null} [legacyRedirectionState] ProjectSettings legacyRedirectionState */ /** - * Constructs a new ListVersionsRequest. + * Constructs a new ProjectSettings. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListVersionsRequest. - * @implements IListVersionsRequest + * @classdesc Represents a ProjectSettings. + * @implements IProjectSettings * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set */ - function ListVersionsRequest(properties) { + function ProjectSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8930,114 +8995,88 @@ } /** - * ListVersionsRequest parent. - * @member {string} parent - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.parent = ""; - - /** - * ListVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest - * @instance - */ - ListVersionsRequest.prototype.pageSize = 0; - - /** - * ListVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * ProjectSettings name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @instance */ - ListVersionsRequest.prototype.pageToken = ""; + ProjectSettings.prototype.name = ""; /** - * ListVersionsRequest view. - * @member {google.devtools.artifactregistry.v1beta2.VersionView} view - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * ProjectSettings legacyRedirectionState. + * @member {google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState} legacyRedirectionState + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @instance */ - ListVersionsRequest.prototype.view = 0; + ProjectSettings.prototype.legacyRedirectionState = 0; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ProjectSettings instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} ListVersionsRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings instance */ - ListVersionsRequest.create = function create(properties) { - return new ListVersionsRequest(properties); + ProjectSettings.create = function create(properties) { + return new ProjectSettings(properties); }; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsRequest.verify|verify} messages. + * Encodes the specified ProjectSettings message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings} message ProjectSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsRequest.encode = function encode(message, writer) { + ProjectSettings.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.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 ListVersionsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsRequest.verify|verify} messages. + * Encodes the specified ProjectSettings message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ProjectSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IProjectSettings} message ProjectSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ProjectSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * Decodes a ProjectSettings message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsRequest} ListVersionsRequest + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings * @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) { + 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.v1beta2.ListVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.ProjectSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.view = reader.int32(); + message.legacyRedirectionState = reader.int32(); break; default: reader.skipType(tag & 7); @@ -9048,152 +9087,157 @@ }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ProjectSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} ListVersionsRequest + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings * @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) { + ProjectSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsRequest message. + * Verifies a ProjectSettings message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @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) { + ProjectSettings.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) { + 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 "view: enum value expected"; + return "legacyRedirectionState: enum value expected"; case 0: case 1: case 2: + case 3: break; } return null; }; /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ProjectSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} ListVersionsRequest + * @returns {google.devtools.artifactregistry.v1beta2.ProjectSettings} ProjectSettings */ - ListVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListVersionsRequest) + ProjectSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ProjectSettings) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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": + var message = new $root.google.devtools.artifactregistry.v1beta2.ProjectSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.legacyRedirectionState) { + case "REDIRECTION_STATE_UNSPECIFIED": case 0: - message.view = 0; + message.legacyRedirectionState = 0; break; - case "BASIC": + case "REDIRECTION_FROM_GCR_IO_DISABLED": case 1: - message.view = 1; + message.legacyRedirectionState = 1; break; - case "FULL": + case "REDIRECTION_FROM_GCR_IO_ENABLED": case 2: - message.view = 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 ListVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ProjectSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @static - * @param {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} message ListVersionsRequest + * @param {google.devtools.artifactregistry.v1beta2.ProjectSettings} message ProjectSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsRequest.toObject = function toObject(message, options) { + ProjectSettings.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.name = ""; + object.legacyRedirectionState = options.enums === String ? "REDIRECTION_STATE_UNSPECIFIED" : 0; } - 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.v1beta2.VersionView[message.view] : message.view; + 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.v1beta2.ProjectSettings.RedirectionState[message.legacyRedirectionState] : message.legacyRedirectionState; return object; }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ProjectSettings to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @memberof google.devtools.artifactregistry.v1beta2.ProjectSettings * @instance * @returns {Object.} JSON object */ - ListVersionsRequest.prototype.toJSON = function toJSON() { + ProjectSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListVersionsRequest; + /** + * RedirectionState enum. + * @name google.devtools.artifactregistry.v1beta2.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; })(); - v1beta2.ListVersionsResponse = (function() { + v1beta2.GetProjectSettingsRequest = (function() { /** - * Properties of a ListVersionsResponse. + * Properties of a GetProjectSettingsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IListVersionsResponse - * @property {Array.|null} [versions] ListVersionsResponse versions - * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + * @interface IGetProjectSettingsRequest + * @property {string|null} [name] GetProjectSettingsRequest name */ /** - * Constructs a new ListVersionsResponse. + * Constructs a new GetProjectSettingsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a ListVersionsResponse. - * @implements IListVersionsResponse + * @classdesc Represents a GetProjectSettingsRequest. + * @implements IGetProjectSettingsRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsResponse=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set */ - function ListVersionsResponse(properties) { - this.versions = []; + function GetProjectSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9201,91 +9245,75 @@ } /** - * ListVersionsResponse versions. - * @member {Array.} versions - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse - * @instance - */ - ListVersionsResponse.prototype.versions = $util.emptyArray; - - /** - * ListVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * GetProjectSettingsRequest name. + * @member {string} name + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @instance */ - ListVersionsResponse.prototype.nextPageToken = ""; + GetProjectSettingsRequest.prototype.name = ""; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new GetProjectSettingsRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsResponse=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} ListVersionsResponse instance + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest instance */ - ListVersionsResponse.create = function create(properties) { - return new ListVersionsResponse(properties); + GetProjectSettingsRequest.create = function create(properties) { + return new GetProjectSettingsRequest(properties); }; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsResponse.verify|verify} messages. + * Encodes the specified GetProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsResponse.encode = function encode(message, writer) { + GetProjectSettingsRequest.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.v1beta2.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); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsResponse.verify|verify} messages. + * Encodes the specified GetProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest} message GetProjectSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsResponse} ListVersionsResponse + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest * @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) { + 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.v1beta2.ListVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest(); 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.v1beta2.Version.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -9296,134 +9324,108 @@ }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetProjectSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} ListVersionsResponse + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest * @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) { + GetProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsResponse message. + * Verifies a GetProjectSettingsRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @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) { + GetProjectSettingsRequest.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.v1beta2.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} ListVersionsResponse + * @returns {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} GetProjectSettingsRequest */ - ListVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse) + GetProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse(); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsResponse.versions: object expected"); - message.versions[i] = $root.google.devtools.artifactregistry.v1beta2.Version.fromObject(object.versions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetProjectSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} message ListVersionsResponse + * @param {google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest} message GetProjectSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsResponse.toObject = function toObject(message, options) { + GetProjectSettingsRequest.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.v1beta2.Version.toObject(message.versions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this GetProjectSettingsRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @memberof google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest * @instance * @returns {Object.} JSON object */ - ListVersionsResponse.prototype.toJSON = function toJSON() { + GetProjectSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListVersionsResponse; + return GetProjectSettingsRequest; })(); - v1beta2.GetVersionRequest = (function() { + v1beta2.UpdateProjectSettingsRequest = (function() { /** - * Properties of a GetVersionRequest. + * Properties of an UpdateProjectSettingsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IGetVersionRequest - * @property {string|null} [name] GetVersionRequest name - * @property {google.devtools.artifactregistry.v1beta2.VersionView|null} [view] GetVersionRequest view + * @interface IUpdateProjectSettingsRequest + * @property {google.devtools.artifactregistry.v1beta2.IProjectSettings|null} [projectSettings] UpdateProjectSettingsRequest projectSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProjectSettingsRequest updateMask */ /** - * Constructs a new GetVersionRequest. + * Constructs a new UpdateProjectSettingsRequest. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a GetVersionRequest. - * @implements IGetVersionRequest + * @classdesc Represents an UpdateProjectSettingsRequest. + * @implements IUpdateProjectSettingsRequest * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set */ - function GetVersionRequest(properties) { + function UpdateProjectSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9431,88 +9433,88 @@ } /** - * GetVersionRequest name. - * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * UpdateProjectSettingsRequest projectSettings. + * @member {google.devtools.artifactregistry.v1beta2.IProjectSettings|null|undefined} projectSettings + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @instance */ - GetVersionRequest.prototype.name = ""; + UpdateProjectSettingsRequest.prototype.projectSettings = null; /** - * GetVersionRequest view. - * @member {google.devtools.artifactregistry.v1beta2.VersionView} view - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * UpdateProjectSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @instance */ - GetVersionRequest.prototype.view = 0; + UpdateProjectSettingsRequest.prototype.updateMask = null; /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new UpdateProjectSettingsRequest instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.GetVersionRequest} GetVersionRequest instance + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest instance */ - GetVersionRequest.create = function create(properties) { - return new GetVersionRequest(properties); + UpdateProjectSettingsRequest.create = function create(properties) { + return new UpdateProjectSettingsRequest(properties); }; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetVersionRequest.verify|verify} messages. + * Encodes the specified UpdateProjectSettingsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encode = function encode(message, writer) { + UpdateProjectSettingsRequest.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); + if (message.projectSettings != null && Object.hasOwnProperty.call(message, "projectSettings")) + $root.google.devtools.artifactregistry.v1beta2.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 GetVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetVersionRequest.verify|verify} messages. + * Encodes the specified UpdateProjectSettingsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest} message UpdateProjectSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateProjectSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.GetVersionRequest} GetVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest * @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) { + 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.v1beta2.GetVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; case 2: - message.view = reader.int32(); + message.projectSettings = $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9523,135 +9525,127 @@ }; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateProjectSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.GetVersionRequest} GetVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest * @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) { + UpdateProjectSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVersionRequest message. + * Verifies an UpdateProjectSettingsRequest message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @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) { + UpdateProjectSettingsRequest.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; - } + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) { + var error = $root.google.devtools.artifactregistry.v1beta2.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 a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateProjectSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.GetVersionRequest} GetVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} UpdateProjectSettingsRequest */ - GetVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetVersionRequest) + UpdateProjectSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.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; + var message = new $root.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest(); + if (object.projectSettings != null) { + if (typeof object.projectSettings !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.projectSettings: object expected"); + message.projectSettings = $root.google.devtools.artifactregistry.v1beta2.ProjectSettings.fromObject(object.projectSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateProjectSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @static - * @param {google.devtools.artifactregistry.v1beta2.GetVersionRequest} message GetVersionRequest + * @param {google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest} message UpdateProjectSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVersionRequest.toObject = function toObject(message, options) { + UpdateProjectSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "VERSION_VIEW_UNSPECIFIED" : 0; + object.projectSettings = null; + object.updateMask = null; } - 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.v1beta2.VersionView[message.view] : message.view; + if (message.projectSettings != null && message.hasOwnProperty("projectSettings")) + object.projectSettings = $root.google.devtools.artifactregistry.v1beta2.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 GetVersionRequest to JSON. + * Converts this UpdateProjectSettingsRequest to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest * @instance * @returns {Object.} JSON object */ - GetVersionRequest.prototype.toJSON = function toJSON() { + UpdateProjectSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetVersionRequest; + return UpdateProjectSettingsRequest; })(); - v1beta2.DeleteVersionRequest = (function() { + v1beta2.Tag = (function() { /** - * Properties of a DeleteVersionRequest. + * Properties of a Tag. * @memberof google.devtools.artifactregistry.v1beta2 - * @interface IDeleteVersionRequest - * @property {string|null} [name] DeleteVersionRequest name - * @property {boolean|null} [force] DeleteVersionRequest force - */ - + * @interface ITag + * @property {string|null} [name] Tag name + * @property {string|null} [version] Tag version + */ + /** - * Constructs a new DeleteVersionRequest. + * Constructs a new Tag. * @memberof google.devtools.artifactregistry.v1beta2 - * @classdesc Represents a DeleteVersionRequest. - * @implements IDeleteVersionRequest + * @classdesc Represents a Tag. + * @implements ITag * @constructor - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest=} [properties] Properties to set + * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set */ - function DeleteVersionRequest(properties) { + function Tag(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9659,80 +9653,80 @@ } /** - * DeleteVersionRequest name. + * Tag name. * @member {string} name - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @instance */ - DeleteVersionRequest.prototype.name = ""; + Tag.prototype.name = ""; /** - * DeleteVersionRequest force. - * @member {boolean} force - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * Tag version. + * @member {string} version + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @instance */ - DeleteVersionRequest.prototype.force = false; + Tag.prototype.version = ""; /** - * Creates a new DeleteVersionRequest instance using the specified properties. + * Creates a new Tag instance using the specified properties. * @function create - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest=} [properties] Properties to set - * @returns {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} DeleteVersionRequest instance + * @param {google.devtools.artifactregistry.v1beta2.ITag=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag instance */ - DeleteVersionRequest.create = function create(properties) { - return new DeleteVersionRequest(properties); + Tag.create = function create(properties) { + return new Tag(properties); }; /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteVersionRequest.verify|verify} messages. + * Encodes the specified Tag message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. * @function encode - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.ITag} message Tag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVersionRequest.encode = function encode(message, 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.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); return writer; }; /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteVersionRequest.verify|verify} messages. + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Tag.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static - * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {google.devtools.artifactregistry.v1beta2.ITag} message Tag message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + Tag.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * Decodes a Tag message from the specified reader or buffer. * @function decode - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag * @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) { + 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.v1beta2.DeleteVersionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.artifactregistry.v1beta2.Tag(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9740,7 +9734,7 @@ message.name = reader.string(); break; case 2: - message.force = reader.bool(); + message.version = reader.string(); break; default: reader.skipType(tag & 7); @@ -9751,259 +9745,4288 @@ }; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a Tag message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag * @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) { + Tag.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteVersionRequest message. + * Verifies a Tag message. * @function verify - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @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) { + 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.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Tag message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static * @param {Object.} object Plain object - * @returns {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.devtools.artifactregistry.v1beta2.Tag} Tag */ - DeleteVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest) + Tag.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Tag) return object; - var message = new $root.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest(); + var message = new $root.google.devtools.artifactregistry.v1beta2.Tag(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * Creates a plain object from a Tag message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @static - * @param {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} message DeleteVersionRequest + * @param {google.devtools.artifactregistry.v1beta2.Tag} message Tag * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteVersionRequest.toObject = function toObject(message, options) { + Tag.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.force = false; + object.version = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this DeleteVersionRequest to JSON. + * Converts this Tag to JSON. * @function toJSON - * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @memberof google.devtools.artifactregistry.v1beta2.Tag * @instance * @returns {Object.} JSON object */ - DeleteVersionRequest.prototype.toJSON = function toJSON() { + Tag.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteVersionRequest; + return Tag; })(); - return v1beta2; - })(); + v1beta2.ListTagsRequest = (function() { - return artifactregistry; - })(); + /** + * Properties of a ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @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 + */ - return devtools; - })(); + /** + * Constructs a new ListTagsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListTagsRequest. + * @implements IListTagsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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]]; + } - google.api = (function() { + /** + * ListTagsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.parent = ""; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * ListTagsRequest filter. + * @member {string} filter + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.filter = ""; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); + /** + * ListTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageSize = 0; - api.ResourceDescriptor = (function() { + /** + * ListTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @instance + */ + ListTagsRequest.prototype.pageToken = ""; - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ + /** + * Creates a new ListTagsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListTagsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListTagsRequest} ListTagsRequest instance + */ + ListTagsRequest.create = function create(properties) { + return new ListTagsRequest(properties); + }; - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - 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]]; - } + /** + * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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; + }; - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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(); + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Decodes a ListTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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; + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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()); + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Verifies a ListTagsRequest message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.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; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListTagsRequest} ListTagsRequest + */ + ListTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListTagsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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; + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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; + }; - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; + /** + * Converts this ListTagsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; + return ListTagsRequest; + })(); - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + v1beta2.ListTagsResponse = (function() { + + /** + * Properties of a ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListTagsResponse + * @property {Array.|null} [tags] ListTagsResponse tags + * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken + */ + + /** + * Constructs a new ListTagsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListTagsResponse. + * @implements IListTagsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.tags = $util.emptyArray; + + /** + * ListTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * @instance + */ + ListTagsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTagsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListTagsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListTagsResponse} ListTagsResponse instance + */ + ListTagsResponse.create = function create(properties) { + return new ListTagsResponse(properties); + }; + + /** + * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListTagsResponse} ListTagsResponse + */ + ListTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ListTagsResponse(); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsResponse.tags: object expected"); + message.tags[i] = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ListTagsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTagsResponse; + })(); + + v1beta2.GetTagRequest = (function() { + + /** + * Properties of a GetTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetTagRequest + * @property {string|null} [name] GetTagRequest name + */ + + /** + * Constructs a new GetTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetTagRequest. + * @implements IGetTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetTagRequest + * @instance + */ + GetTagRequest.prototype.name = ""; + + /** + * Creates a new GetTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetTagRequest} GetTagRequest instance + */ + GetTagRequest.create = function create(properties) { + return new GetTagRequest(properties); + }; + + /** + * Encodes the specified GetTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.GetTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetTagRequest} GetTagRequest + */ + GetTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.GetTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetTagRequest + * @instance + * @returns {Object.} JSON object + */ + GetTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTagRequest; + })(); + + v1beta2.CreateTagRequest = (function() { + + /** + * Properties of a CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface ICreateTagRequest + * @property {string|null} [parent] CreateTagRequest parent + * @property {string|null} [tagId] CreateTagRequest tagId + * @property {google.devtools.artifactregistry.v1beta2.ITag|null} [tag] CreateTagRequest tag + */ + + /** + * Constructs a new CreateTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a CreateTagRequest. + * @implements ICreateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.parent = ""; + + /** + * CreateTagRequest tagId. + * @member {string} tagId + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tagId = ""; + + /** + * CreateTagRequest tag. + * @member {google.devtools.artifactregistry.v1beta2.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @instance + */ + CreateTagRequest.prototype.tag = null; + + /** + * Creates a new CreateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.ICreateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.CreateTagRequest} CreateTagRequest instance + */ + CreateTagRequest.create = function create(properties) { + return new CreateTagRequest(properties); + }; + + /** + * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.CreateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.CreateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CreateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CreateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.CreateTagRequest} CreateTagRequest + */ + CreateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.CreateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.CreateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Tag.toObject(message.tag, options); + return object; + }; + + /** + * Converts this CreateTagRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.CreateTagRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTagRequest; + })(); + + v1beta2.UpdateTagRequest = (function() { + + /** + * Properties of an UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IUpdateTagRequest + * @property {google.devtools.artifactregistry.v1beta2.ITag|null} [tag] UpdateTagRequest tag + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask + */ + + /** + * Constructs a new UpdateTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an UpdateTagRequest. + * @implements IUpdateTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ITag|null|undefined} tag + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.tag = null; + + /** + * UpdateTagRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @instance + */ + UpdateTagRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IUpdateTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} UpdateTagRequest instance + */ + UpdateTagRequest.create = function create(properties) { + return new UpdateTagRequest(properties); + }; + + /** + * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.UpdateTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.UpdateTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tag = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.UpdateTagRequest} UpdateTagRequest + */ + UpdateTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.UpdateTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.UpdateTagRequest(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.UpdateTagRequest.tag: object expected"); + message.tag = $root.google.devtools.artifactregistry.v1beta2.Tag.fromObject(object.tag); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.UpdateTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.UpdateTagRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateTagRequest; + })(); + + v1beta2.DeleteTagRequest = (function() { + + /** + * Properties of a DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IDeleteTagRequest + * @property {string|null} [name] DeleteTagRequest name + */ + + /** + * Constructs a new DeleteTagRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a DeleteTagRequest. + * @implements IDeleteTagRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest + * @instance + */ + DeleteTagRequest.prototype.name = ""; + + /** + * Creates a new DeleteTagRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IDeleteTagRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} DeleteTagRequest instance + */ + DeleteTagRequest.create = function create(properties) { + return new DeleteTagRequest(properties); + }; + + /** + * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteTagRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.DeleteTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.DeleteTagRequest} DeleteTagRequest + */ + DeleteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteTagRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteTagRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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 + */ + v1beta2.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; + })(); + + v1beta2.Version = (function() { + + /** + * Properties of a Version. + * @memberof google.devtools.artifactregistry.v1beta2 + * @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.v1beta2 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.Version + * @instance + */ + Version.prototype.name = ""; + + /** + * Version description. + * @member {string} description + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @instance + */ + Version.prototype.description = ""; + + /** + * Version createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @instance + */ + Version.prototype.createTime = null; + + /** + * Version updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @instance + */ + Version.prototype.updateTime = null; + + /** + * Version relatedTags. + * @member {Array.} relatedTags + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @instance + */ + Version.prototype.relatedTags = $util.emptyArray; + + /** + * Version metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @instance + */ + Version.prototype.metadata = null; + + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @static + * @param {google.devtools.artifactregistry.v1beta2.IVersion=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; + + /** + * Encodes the specified Version message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.Version.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.Version + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Version + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.Version) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Version.relatedTags: object expected"); + message.relatedTags[i] = $root.google.devtools.artifactregistry.v1beta2.Tag.fromObject(object.relatedTags[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.Version + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Version; + })(); + + v1beta2.ListVersionsRequest = (function() { + + /** + * Properties of a ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {number|null} [pageSize] ListVersionsRequest pageSize + * @property {string|null} [pageToken] ListVersionsRequest pageToken + * @property {google.devtools.artifactregistry.v1beta2.VersionView|null} [view] ListVersionsRequest view + * @property {string|null} [orderBy] ListVersionsRequest orderBy + */ + + /** + * Constructs a new ListVersionsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.parent = ""; + + /** + * ListVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageSize = 0; + + /** + * ListVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.pageToken = ""; + + /** + * ListVersionsRequest view. + * @member {google.devtools.artifactregistry.v1beta2.VersionView} view + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.view = 0; + + /** + * ListVersionsRequest orderBy. + * @member {string} orderBy + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListVersionsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} ListVersionsRequest instance + */ + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); + }; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsRequest} ListVersionsRequest + */ + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListVersionsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVersionsRequest; + })(); + + v1beta2.ListVersionsResponse = (function() { + + /** + * Properties of a ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IListVersionsResponse + * @property {Array.|null} [versions] ListVersionsResponse versions + * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListVersionsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a ListVersionsResponse. + * @implements IListVersionsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.versions = $util.emptyArray; + + /** + * ListVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IListVersionsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} ListVersionsResponse instance + */ + ListVersionsResponse.create = function create(properties) { + return new ListVersionsResponse(properties); + }; + + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ListVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ListVersionsResponse} ListVersionsResponse + */ + ListVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ListVersionsResponse(); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsResponse.versions: object expected"); + message.versions[i] = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ListVersionsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ListVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListVersionsResponse; + })(); + + v1beta2.GetVersionRequest = (function() { + + /** + * Properties of a GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name + * @property {google.devtools.artifactregistry.v1beta2.VersionView|null} [view] GetVersionRequest view + */ + + /** + * Constructs a new GetVersionRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.name = ""; + + /** + * GetVersionRequest view. + * @member {google.devtools.artifactregistry.v1beta2.VersionView} view + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.view = 0; + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IGetVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.GetVersionRequest} GetVersionRequest instance + */ + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); + }; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.GetVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.GetVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.GetVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.GetVersionRequest} GetVersionRequest + */ + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.GetVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.GetVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.VersionView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetVersionRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.GetVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetVersionRequest; + })(); + + v1beta2.DeleteVersionRequest = (function() { + + /** + * Properties of a DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name + * @property {boolean|null} [force] DeleteVersionRequest force + */ + + /** + * Constructs a new DeleteVersionRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.name = ""; + + /** + * DeleteVersionRequest force. + * @member {boolean} force + * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.force = false; + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} DeleteVersionRequest instance + */ + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); + }; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.DeleteVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.DeleteVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.DeleteVersionRequest} DeleteVersionRequest + */ + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteVersionRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.DeleteVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteVersionRequest; + })(); + + v1beta2.YumArtifact = (function() { + + /** + * Properties of a YumArtifact. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IYumArtifact + * @property {string|null} [name] YumArtifact name + * @property {string|null} [packageName] YumArtifact packageName + * @property {google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType|null} [packageType] YumArtifact packageType + * @property {string|null} [architecture] YumArtifact architecture + */ + + /** + * Constructs a new YumArtifact. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents a YumArtifact. + * @implements IYumArtifact + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.YumArtifact + * @instance + */ + YumArtifact.prototype.name = ""; + + /** + * YumArtifact packageName. + * @member {string} packageName + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @instance + */ + YumArtifact.prototype.packageName = ""; + + /** + * YumArtifact packageType. + * @member {google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType} packageType + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @instance + */ + YumArtifact.prototype.packageType = 0; + + /** + * YumArtifact architecture. + * @member {string} architecture + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @instance + */ + YumArtifact.prototype.architecture = ""; + + /** + * Creates a new YumArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.IYumArtifact=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.YumArtifact} YumArtifact instance + */ + YumArtifact.create = function create(properties) { + return new YumArtifact(properties); + }; + + /** + * Encodes the specified YumArtifact message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.YumArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.YumArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YumArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.YumArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.YumArtifact} YumArtifact + */ + YumArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.YumArtifact) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.YumArtifact + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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; + })(); + + v1beta2.ImportYumArtifactsGcsSource = (function() { + + /** + * Properties of an ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportYumArtifactsGcsSource + * @property {Array.|null} [uris] ImportYumArtifactsGcsSource uris + * @property {boolean|null} [useWildcards] ImportYumArtifactsGcsSource useWildcards + */ + + /** + * Constructs a new ImportYumArtifactsGcsSource. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportYumArtifactsGcsSource. + * @implements IImportYumArtifactsGcsSource + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.uris = $util.emptyArray; + + /** + * ImportYumArtifactsGcsSource useWildcards. + * @member {boolean} useWildcards + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + * @instance + */ + ImportYumArtifactsGcsSource.prototype.useWildcards = false; + + /** + * Creates a new ImportYumArtifactsGcsSource instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource instance + */ + ImportYumArtifactsGcsSource.create = function create(properties) { + return new ImportYumArtifactsGcsSource(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsGcsSource message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource} ImportYumArtifactsGcsSource + */ + ImportYumArtifactsGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsGcsSource; + })(); + + v1beta2.ImportYumArtifactsRequest = (function() { + + /** + * Properties of an ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportYumArtifactsRequest + * @property {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsRequest gcsSource + * @property {string|null} [parent] ImportYumArtifactsRequest parent + */ + + /** + * Constructs a new ImportYumArtifactsRequest. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportYumArtifactsRequest. + * @implements IImportYumArtifactsRequest + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + * @instance + */ + ImportYumArtifactsRequest.prototype.gcsSource = null; + + /** + * ImportYumArtifactsRequest parent. + * @member {string} parent + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest} ImportYumArtifactsRequest instance + */ + ImportYumArtifactsRequest.create = function create(properties) { + return new ImportYumArtifactsRequest(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsRequest message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest} ImportYumArtifactsRequest + */ + ImportYumArtifactsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsRequest + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsGcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + return object; + }; + + /** + * Converts this ImportYumArtifactsRequest to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsRequest; + })(); + + v1beta2.ImportYumArtifactsErrorInfo = (function() { + + /** + * Properties of an ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportYumArtifactsErrorInfo + * @property {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsGcsSource|null} [gcsSource] ImportYumArtifactsErrorInfo gcsSource + * @property {google.rpc.IStatus|null} [error] ImportYumArtifactsErrorInfo error + */ + + /** + * Constructs a new ImportYumArtifactsErrorInfo. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportYumArtifactsErrorInfo. + * @implements IImportYumArtifactsErrorInfo + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.IImportYumArtifactsGcsSource|null|undefined} gcsSource + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + * @instance + */ + ImportYumArtifactsErrorInfo.prototype.gcsSource = null; + + /** + * ImportYumArtifactsErrorInfo error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsErrorInfo=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo instance + */ + ImportYumArtifactsErrorInfo.create = function create(properties) { + return new ImportYumArtifactsErrorInfo(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsErrorInfo message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo} ImportYumArtifactsErrorInfo + */ + ImportYumArtifactsErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo.gcsSource: object expected"); + message.gcsSource = $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource.fromObject(object.gcsSource); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsErrorInfo; + })(); + + v1beta2.ImportYumArtifactsResponse = (function() { + + /** + * Properties of an ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportYumArtifactsResponse + * @property {Array.|null} [yumArtifacts] ImportYumArtifactsResponse yumArtifacts + * @property {Array.|null} [errors] ImportYumArtifactsResponse errors + */ + + /** + * Constructs a new ImportYumArtifactsResponse. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportYumArtifactsResponse. + * @implements IImportYumArtifactsResponse + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.yumArtifacts = $util.emptyArray; + + /** + * ImportYumArtifactsResponse errors. + * @member {Array.} errors + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @instance + */ + ImportYumArtifactsResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ImportYumArtifactsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse} ImportYumArtifactsResponse instance + */ + ImportYumArtifactsResponse.create = function create(properties) { + return new ImportYumArtifactsResponse(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsResponse message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YumArtifact.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse} ImportYumArtifactsResponse + */ + ImportYumArtifactsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse) + return object; + var message = new $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse(); + if (object.yumArtifacts) { + if (!Array.isArray(object.yumArtifacts)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse.yumArtifacts: object expected"); + message.yumArtifacts[i] = $root.google.devtools.artifactregistry.v1beta2.YumArtifact.fromObject(object.yumArtifacts[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse.errors: object expected"); + message.errors[i] = $root.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse} message ImportYumArtifactsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.v1beta2.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.v1beta2.ImportYumArtifactsErrorInfo.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ImportYumArtifactsResponse to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsResponse; + })(); + + v1beta2.ImportYumArtifactsMetadata = (function() { + + /** + * Properties of an ImportYumArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @interface IImportYumArtifactsMetadata + */ + + /** + * Constructs a new ImportYumArtifactsMetadata. + * @memberof google.devtools.artifactregistry.v1beta2 + * @classdesc Represents an ImportYumArtifactsMetadata. + * @implements IImportYumArtifactsMetadata + * @constructor + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata=} [properties] Properties to set + */ + 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]]; + } + + /** + * Creates a new ImportYumArtifactsMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata=} [properties] Properties to set + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata instance + */ + ImportYumArtifactsMetadata.create = function create(properties) { + return new ImportYumArtifactsMetadata(properties); + }; + + /** + * Encodes the specified ImportYumArtifactsMetadata message. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata} message ImportYumArtifactsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportYumArtifactsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ImportYumArtifactsMetadata message, length delimited. Does not implicitly {@link google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.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(); + }; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ImportYumArtifactsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportYumArtifactsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportYumArtifactsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportYumArtifactsMetadata message. + * @function verify + * @memberof google.devtools.artifactregistry.v1beta2.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; + }; + + /** + * Creates an ImportYumArtifactsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata} ImportYumArtifactsMetadata + */ + ImportYumArtifactsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata) + return object; + return new $root.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata(); + }; + + /** + * Creates a plain object from an ImportYumArtifactsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @static + * @param {google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata} message ImportYumArtifactsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportYumArtifactsMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ImportYumArtifactsMetadata to JSON. + * @function toJSON + * @memberof google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportYumArtifactsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImportYumArtifactsMetadata; + })(); + + return v1beta2; + })(); + + return artifactregistry; + })(); + + return devtools; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); if (message.history != null && Object.hasOwnProperty.call(message, "history")) @@ -17649,12 +21672,245 @@ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.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.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function EnumValueOptions(properties) { + function ServiceOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -17663,85 +21919,105 @@ } /** - * EnumValueOptions deprecated. + * ServiceOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumValueOptions.prototype.deprecated = false; + ServiceOptions.prototype.deprecated = false; /** - * EnumValueOptions uninterpretedOption. + * ServiceOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueOptions instance using the specified properties. + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + ServiceOptions.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.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 33: message.deprecated = reader.bool(); break; case 999: @@ -17749,6 +22025,12 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -17758,30 +22040,30 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -17796,53 +22078,66 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.EnumValueOptions(); + var message = new $root.google.protobuf.ServiceOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) + if (options.defaults) { object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -17850,45 +22145,52 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueOptions; + return ServiceOptions; })(); - protobuf.ServiceOptions = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a ServiceOptions. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new ServiceOptions. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function ServiceOptions(properties) { + function MethodOptions(properties) { this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17896,117 +22198,146 @@ } /** - * ServiceOptions deprecated. + * MethodOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype.deprecated = false; + MethodOptions.prototype.deprecated = false; /** - * ServiceOptions uninterpretedOption. + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + MethodOptions.prototype[".google.api.http"] = null; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * Creates a new ServiceOptions instance using the specified properties. + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + MethodOptions.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.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 33: message.deprecated = reader.bool(); break; + case 34: + message.idempotencyLevel = reader.int32(); + break; case 999: if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -18017,35 +22348,44 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -18055,119 +22395,183 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.ServiceOptions(); + var message = new $root.google.protobuf.MethodOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } if (options.defaults) { object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; })(); - protobuf.MethodOptions = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a MethodOptions. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new MethodOptions. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18175,146 +22579,156 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.deprecated = false; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.idempotencyLevel = 0; + UninterpretedOption.prototype.identifierValue = ""; /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + UninterpretedOption.prototype.doubleValue = 0; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + UninterpretedOption.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.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; - case 34: - message.idempotencyLevel = reader.int32(); + case 3: + message.identifierValue = reader.string(); break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 4: + message.positiveIntValue = reader.uint64(); break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + case 5: + message.negativeIntValue = reader.int64(); break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 6: + message.doubleValue = reader.double(); break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); break; default: reader.skipType(tag & 7); @@ -18325,230 +22739,422 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); if (error) - return "uninterpretedOption." + error; + return "name." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } + if (options.arrays || options.defaults) + object.name = []; if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.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.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; })(); - return MethodOptions; + return UninterpretedOption; })(); - protobuf.UninterpretedOption = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of an UninterpretedOption. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new UninterpretedOption. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18556,156 +23162,78 @@ } /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + SourceCodeInfo.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.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -18716,209 +23244,128 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); if (error) - return "name." + error; + return "location." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - UninterpretedOption.NamePart = (function() { + SourceCodeInfo.Location = (function() { /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ - function NamePart(properties) { + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18926,212 +23373,338 @@ } /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - NamePart.prototype.namePart = ""; + Location.prototype.path = $util.emptyArray; /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - NamePart.prototype.isExtension = false; + Location.prototype.span = $util.emptyArray; /** - * Creates a new NamePart instance using the specified properties. + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ - NamePart.create = function create(properties) { - return new NamePart(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); return writer; }; /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NamePart message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + Location.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.UninterpretedOption.NamePart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.namePart = reader.string(); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; case 2: - message.isExtension = reader.bool(); + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NamePart message. + * Verifies a Location message. * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } return null; }; /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } return message; }; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; return object; }; /** - * Converts this NamePart to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NamePart; + return Location; })(); - return UninterpretedOption; + return SourceCodeInfo; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19139,78 +23712,78 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + GeneratedCodeInfo.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.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -19221,128 +23794,125 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); if (error) - return "location." + error; + return "annotation." + error; } } return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); } } return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SourceCodeInfo.Location = (function() { + GeneratedCodeInfo.Annotation = (function() { /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end */ /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function Location(properties) { + function Annotation(properties) { this.path = []; - this.span = []; - this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19350,67 +23920,59 @@ } /** - * Location path. + * Annotation path. * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.span = $util.emptyArray; + Annotation.prototype.path = $util.emptyArray; /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.leadingComments = ""; + Annotation.prototype.sourceFile = ""; /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.trailingComments = ""; + Annotation.prototype.begin = 0; /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + Annotation.prototype.end = 0; /** - * Creates a new Location instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - Location.create = function create(properties) { - return new Location(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.path != null && message.path.length) { @@ -19419,50 +23981,43 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Annotation.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.SourceCodeInfo.Location(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19477,25 +24032,13 @@ message.path.push(reader.int32()); break; case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); + message.sourceFile = reader.string(); break; case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); + message.begin = reader.int32(); break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); + case 4: + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -19506,30 +24049,30 @@ }; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Location message. + * Verifies an Annotation message. * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.path != null && message.hasOwnProperty("path")) { @@ -19539,149 +24082,340 @@ if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); if (object.path) { if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); message.path = []; for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; + object.sourceFile = ""; + object.begin = 0; + object.end = 0; } if (message.path && message.path.length) { object.path = []; for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - }; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - return Location; - })(); + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SourceCodeInfo; + return Timestamp; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.Any = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of an Any. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19689,78 +24423,88 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + Any.prototype.type_url = ""; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * 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.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decode = function decode(reader, length) { + 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.GeneratedCodeInfo(); + 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: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -19771,404 +24515,348 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } + 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 a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } + * @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 a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + 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 GeneratedCodeInfo to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + return Any; + })(); - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + protobuf.Duration = (function() { - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - return writer; - }; + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.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.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + } + return message; + }; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - }; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - return Annotation; - })(); + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GeneratedCodeInfo; + return Duration; })(); - protobuf.Timestamp = (function() { + protobuf.Empty = (function() { /** - * Properties of a Timestamp. + * Properties of an Empty. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IEmpty */ /** - * Constructs a new Timestamp. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Timestamp(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20176,89 +24864,63 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.ITimestamp} message Timestamp 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 */ - Timestamp.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.ITimestamp} message Timestamp 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 */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @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.Timestamp} Timestamp + * @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 */ - Timestamp.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.Timestamp(); + 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.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -20268,110 +24930,74 @@ }; /** - * Decodes a Timestamp 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.Timestamp + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.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 Timestamp message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Timestamp + * @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 */ - Timestamp.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Empty} Empty */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a Timestamp 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.Timestamp + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Timestamp to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return Empty; })(); protobuf.FieldMask = (function() { @@ -20577,25 +25203,25 @@ return FieldMask; })(); - protobuf.Any = (function() { + protobuf.Struct = (function() { /** - * Properties of an Any. + * Properties of a Struct. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Any. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Any(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) @@ -20603,88 +25229,97 @@ } /** - * 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 + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - Any.prototype.value = $util.newBuffer([]); + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new Any instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Any.create = function create(properties) { - return new Any(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IAny} message Any 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 */ - Any.encode = function encode(message, writer) { + Struct.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.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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.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.Any + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IAny} message Any 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 */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.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.Any(); + 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.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); + 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); @@ -20695,126 +25330,131 @@ }; /** - * Decodes an Any 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.Any + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Struct.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.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 an Any 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.Any + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Struct} Struct */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) 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.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 an Any 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.Any + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Struct.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.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.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 Struct to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + return Struct; })(); - protobuf.Duration = (function() { + protobuf.Value = (function() { /** - * Properties of a Duration. + * Properties of a Value. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @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 Duration. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Duration(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20822,88 +25462,154 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Value.prototype.nullValue = null; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value * @instance */ - Duration.prototype.nanos = 0; + Value.prototype.numberValue = null; /** - * Creates a new Duration instance using the specified properties. + * 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.Duration + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IDuration} message Duration 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 */ - Duration.encode = function encode(message, writer) { + Value.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.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 Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.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.Duration + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IDuration} message Duration 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 */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.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.Duration(); + 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.seconds = reader.int64(); + message.nullValue = reader.int32(); break; case 2: - message.nanos = reader.int32(); + 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); @@ -20914,129 +25620,214 @@ }; /** - * Decodes a Duration 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.Duration + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + Value.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"; + 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 Duration 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.Duration + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Value} Value */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) 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.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 a Duration 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.Duration + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + if (message.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"; } - 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 Value to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Value; })(); - protobuf.Empty = (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 an Empty. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IEmpty + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Empty. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Empty(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21044,63 +25835,79 @@ } /** - * Creates a new Empty instance using the specified properties. + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Empty.create = function create(properties) { - return new Empty(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IEmpty} message Empty 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 */ - Empty.encode = function encode(message, writer) { + ListValue.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(); return writer; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.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.Empty + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IEmpty} message Empty 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 */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @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.Empty} Empty + * @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 */ - Empty.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.Empty(); + 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.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -21110,74 +25917,104 @@ }; /** - * Decodes an Empty 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.Empty + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @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 */ - Empty.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Empty + * @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 */ - Empty.verify = function verify(message) { + ListValue.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 (error) + return "values." + error; + } + } return null; }; /** - * Creates an Empty 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.Empty + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.ListValue} ListValue */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - return new $root.google.protobuf.Empty(); + 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 an Empty 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.Empty + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + ListValue.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); + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return ListValue; })(); return protobuf; diff --git a/protos/protos.json b/protos/protos.json index 90181d3..a50ddf3 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -256,12 +256,139 @@ "csharp_namespace": "Google.Cloud.ArtifactRegistry.V1Beta2", "go_package": "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry", "java_multiple_files": true, - "java_outer_classname": "SettingsProto", + "java_outer_classname": "YumArtifactProto", "java_package": "com.google.devtools.artifactregistry.v1beta2", "php_namespace": "Google\\Cloud\\ArtifactRegistry\\V1beta2", "ruby_package": "Google::Cloud::ArtifactRegistry::V1beta2" }, "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": {} + }, "Hash": { "fields": { "type": { @@ -277,7 +404,8 @@ "HashType": { "values": { "HASH_TYPE_UNSPECIFIED": 0, - "SHA256": 1 + "SHA256": 1, + "MD5": 2 } } } @@ -426,7 +554,18 @@ "(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 @@ -458,10 +597,36 @@ } }, "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 + "DOCKER": 1, + "MAVEN": 2, + "NPM": 3, + "APT": 5, + "YUM": 6, + "PYTHON": 8 } } } @@ -470,7 +635,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } }, "pageSize": { "type": "int32", @@ -499,7 +668,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } } } }, @@ -507,7 +680,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "artifactregistry.googleapis.com/Repository" + } }, "repositoryId": { "type": "string", @@ -535,7 +712,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "artifactregistry.googleapis.com/Repository" + } } } }, @@ -545,6 +726,54 @@ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" }, "methods": { + "ImportAptArtifacts": { + "requestType": "ImportAptArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/aptArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata" + } + } + ] + }, + "ImportYumArtifacts": { + "requestType": "ImportYumArtifactsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{parent=projects/*/locations/*/repositories/*}/yumArtifacts:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse", + "metadata_type": "google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata" + } + } + ] + }, "ListRepositories": { "requestType": "ListRepositoriesRequest", "responseType": "ListRepositoriesResponse", @@ -588,8 +817,8 @@ "(google.api.http).post": "/v1beta2/{parent=projects/*/locations/*}/repositories", "(google.api.http).body": "repository", "(google.api.method_signature)": "parent,repository,repository_id", - "(google.longrunning.operation_info).response_type": "Repository", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).response_type": "google.devtools.artifactregistry.v1beta2.Repository", + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" }, "parsedOptions": [ { @@ -603,8 +832,8 @@ }, { "(google.longrunning.operation_info)": { - "response_type": "Repository", - "metadata_type": "OperationMetadata" + "response_type": "google.devtools.artifactregistry.v1beta2.Repository", + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" } } ] @@ -636,7 +865,7 @@ "(google.api.http).delete": "/v1beta2/{name=projects/*/locations/*/repositories/*}", "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" }, "parsedOptions": [ { @@ -650,7 +879,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" } } ] @@ -698,7 +927,7 @@ "(google.api.http).delete": "/v1beta2/{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": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" }, "parsedOptions": [ { @@ -712,7 +941,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" } } ] @@ -760,7 +989,7 @@ "(google.api.http).delete": "/v1beta2/{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": "OperationMetadata" + "(google.longrunning.operation_info).metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" }, "parsedOptions": [ { @@ -774,7 +1003,7 @@ { "(google.longrunning.operation_info)": { "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "metadata_type": "google.devtools.artifactregistry.v1beta2.OperationMetadata" } } ] @@ -954,13 +1183,105 @@ } } ] + }, + "GetProjectSettings": { + "requestType": "GetProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).get": "/v1beta2/{name=projects/*/projectSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=projects/*/projectSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateProjectSettings": { + "requestType": "UpdateProjectSettingsRequest", + "responseType": "ProjectSettings", + "options": { + "(google.api.http).patch": "/v1beta2/{project_settings.name=projects/*/projectSettings}", + "(google.api.http).body": "project_settings", + "(google.api.method_signature)": "project_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta2/{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", @@ -1049,7 +1370,18 @@ } } }, + "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", @@ -1071,16 +1403,16 @@ "rule": "repeated", "type": "Tag", "id": 7 + }, + "metadata": { + "type": "google.protobuf.Struct", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "VersionView": { - "values": { - "VERSION_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 2 - } - }, "ListVersionsRequest": { "fields": { "parent": { @@ -1098,6 +1430,13 @@ "view": { "type": "VersionView", "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1137,6 +1476,119 @@ "id": 2 } } + }, + "YumArtifact": { + "options": { + "(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, + "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" + } + } + }, + "nested": { + "PackageType": { + "values": { + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2 + } + } + } + }, + "ImportYumArtifactsGcsSource": { + "fields": { + "uris": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "useWildcards": { + "type": "bool", + "id": 2 + } + } + }, + "ImportYumArtifactsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportYumArtifactsGcsSource", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1 + } + } + }, + "ImportYumArtifactsErrorInfo": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "ImportYumArtifactsGcsSource", + "id": 1 + }, + "error": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "ImportYumArtifactsResponse": { + "fields": { + "yumArtifacts": { + "rule": "repeated", + "type": "YumArtifact", + "id": 1 + }, + "errors": { + "rule": "repeated", + "type": "ImportYumArtifactsErrorInfo", + "id": 2 + } + } + }, + "ImportYumArtifactsMetadata": { + "fields": {} } } } @@ -2273,15 +2725,6 @@ } } }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, "Any": { "fields": { "type_url": { @@ -2308,6 +2751,78 @@ }, "Empty": { "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } } } }, diff --git a/samples/generated/v1/artifact_registry.get_repository.js b/samples/generated/v1/artifact_registry.get_repository.js index 61cf001..63045a6 100644 --- a/samples/generated/v1/artifact_registry.get_repository.js +++ b/samples/generated/v1/artifact_registry.get_repository.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1/artifact_registry.list_docker_images.js b/samples/generated/v1/artifact_registry.list_docker_images.js index 0c9405a..a94b31c 100644 --- a/samples/generated/v1/artifact_registry.list_docker_images.js +++ b/samples/generated/v1/artifact_registry.list_docker_images.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1/artifact_registry.list_repositories.js b/samples/generated/v1/artifact_registry.list_repositories.js index 5d5f381..64053e7 100644 --- a/samples/generated/v1/artifact_registry.list_repositories.js +++ b/samples/generated/v1/artifact_registry.list_repositories.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json b/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json new file mode 100644 index 0000000..65a16a9 --- /dev/null +++ b/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json @@ -0,0 +1,151 @@ +{ + "clientLibrary": { + "name": "nodejs-artifactregistry", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListDockerImages_async", + "title": "ArtifactRegistry listDockerImages Sample", + "origin": "API_DEFINITION", + "description": " Lists docker images.", + "canonical": true, + "file": "artifact_registry.list_docker_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDockerImages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "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.ListDockerImagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListDockerImages", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListDockerImages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_ListRepositories_async", + "title": "ArtifactRegistry listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists repositories.", + "canonical": true, + "file": "artifact_registry.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "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.ListRepositoriesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.ListRepositories", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_GetRepository_async", + "title": "ArtifactRegistry getRepository Sample", + "origin": "API_DEFINITION", + "description": " Gets a repository.", + "canonical": true, + "file": "artifact_registry.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1.Repository", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry.GetRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1.ArtifactRegistry" + } + } + } + } + ] +} diff --git a/samples/generated/v1beta2/artifact_registry.create_repository.js b/samples/generated/v1beta2/artifact_registry.create_repository.js index 0856c6b..9a7a76b 100644 --- a/samples/generated/v1beta2/artifact_registry.create_repository.js +++ b/samples/generated/v1beta2/artifact_registry.create_repository.js @@ -1,27 +1,32 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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() { +function main(parent) { // [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_async] /** * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the parent resource where the repository will be created. + * Required. The name of the parent resource where the repository will be created. */ // const parent = 'abc123' /** @@ -42,6 +47,7 @@ function main() { async function callCreateRepository() { // Construct request const request = { + parent, }; // Run request diff --git a/samples/generated/v1beta2/artifact_registry.create_tag.js b/samples/generated/v1beta2/artifact_registry.create_tag.js index d969d98..aa9826a 100644 --- a/samples/generated/v1beta2/artifact_registry.create_tag.js +++ b/samples/generated/v1beta2/artifact_registry.create_tag.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.delete_package.js b/samples/generated/v1beta2/artifact_registry.delete_package.js index 616619d..f1d53a7 100644 --- a/samples/generated/v1beta2/artifact_registry.delete_package.js +++ b/samples/generated/v1beta2/artifact_registry.delete_package.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.delete_repository.js b/samples/generated/v1beta2/artifact_registry.delete_repository.js index b7cb818..e44ae53 100644 --- a/samples/generated/v1beta2/artifact_registry.delete_repository.js +++ b/samples/generated/v1beta2/artifact_registry.delete_repository.js @@ -1,27 +1,32 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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() { +function main(name) { // [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_async] /** * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the repository to delete. + * Required. The name of the repository to delete. */ // const name = 'abc123' @@ -34,6 +39,7 @@ function main() { async function callDeleteRepository() { // Construct request const request = { + name, }; // Run request diff --git a/samples/generated/v1beta2/artifact_registry.delete_tag.js b/samples/generated/v1beta2/artifact_registry.delete_tag.js index 1de8d2d..5c4b0ab 100644 --- a/samples/generated/v1beta2/artifact_registry.delete_tag.js +++ b/samples/generated/v1beta2/artifact_registry.delete_tag.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.delete_version.js b/samples/generated/v1beta2/artifact_registry.delete_version.js index 787229d..fccfa0c 100644 --- a/samples/generated/v1beta2/artifact_registry.delete_version.js +++ b/samples/generated/v1beta2/artifact_registry.delete_version.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.get_file.js b/samples/generated/v1beta2/artifact_registry.get_file.js index 52dd1d8..76c4a8c 100644 --- a/samples/generated/v1beta2/artifact_registry.get_file.js +++ b/samples/generated/v1beta2/artifact_registry.get_file.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.get_iam_policy.js b/samples/generated/v1beta2/artifact_registry.get_iam_policy.js index 9c31934..aa450b8 100644 --- a/samples/generated/v1beta2/artifact_registry.get_iam_policy.js +++ b/samples/generated/v1beta2/artifact_registry.get_iam_policy.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.get_package.js b/samples/generated/v1beta2/artifact_registry.get_package.js index a8b4e2b..0796822 100644 --- a/samples/generated/v1beta2/artifact_registry.get_package.js +++ b/samples/generated/v1beta2/artifact_registry.get_package.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.get_project_settings.js b/samples/generated/v1beta2/artifact_registry.get_project_settings.js new file mode 100644 index 0000000..050e615 --- /dev/null +++ b/samples/generated/v1beta2/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_v1beta2_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').v1beta2; + + // 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_v1beta2_generated_ArtifactRegistry_GetProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta2/artifact_registry.get_repository.js b/samples/generated/v1beta2/artifact_registry.get_repository.js index 0140690..7bf8908 100644 --- a/samples/generated/v1beta2/artifact_registry.get_repository.js +++ b/samples/generated/v1beta2/artifact_registry.get_repository.js @@ -1,27 +1,32 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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() { +function main(name) { // [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async] /** * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the repository to retrieve. + * Required. The name of the repository to retrieve. */ // const name = 'abc123' @@ -34,6 +39,7 @@ function main() { async function callGetRepository() { // Construct request const request = { + name, }; // Run request diff --git a/samples/generated/v1beta2/artifact_registry.get_tag.js b/samples/generated/v1beta2/artifact_registry.get_tag.js index dccdc31..3283f31 100644 --- a/samples/generated/v1beta2/artifact_registry.get_tag.js +++ b/samples/generated/v1beta2/artifact_registry.get_tag.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.get_version.js b/samples/generated/v1beta2/artifact_registry.get_version.js index ff90e8f..f825b81 100644 --- a/samples/generated/v1beta2/artifact_registry.get_version.js +++ b/samples/generated/v1beta2/artifact_registry.get_version.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js b/samples/generated/v1beta2/artifact_registry.import_apt_artifacts.js new file mode 100644 index 0000000..b19c0bc --- /dev/null +++ b/samples/generated/v1beta2/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_v1beta2_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').v1beta2; + + // 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_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js b/samples/generated/v1beta2/artifact_registry.import_yum_artifacts.js new file mode 100644 index 0000000..338ba2d --- /dev/null +++ b/samples/generated/v1beta2/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_v1beta2_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').v1beta2; + + // 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_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta2/artifact_registry.list_files.js b/samples/generated/v1beta2/artifact_registry.list_files.js index 13e015d..86f4ada 100644 --- a/samples/generated/v1beta2/artifact_registry.list_files.js +++ b/samples/generated/v1beta2/artifact_registry.list_files.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; @@ -21,7 +26,8 @@ function main() { * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the parent resource whose files will be listed. + * The name of the repository whose files will be listed. For example: + * "projects/p1/locations/us-central1/repositories/repo1 */ // const parent = 'abc123' /** diff --git a/samples/generated/v1beta2/artifact_registry.list_packages.js b/samples/generated/v1beta2/artifact_registry.list_packages.js index 19ada1c..cebb0e7 100644 --- a/samples/generated/v1beta2/artifact_registry.list_packages.js +++ b/samples/generated/v1beta2/artifact_registry.list_packages.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.list_repositories.js b/samples/generated/v1beta2/artifact_registry.list_repositories.js index 2da3240..9616c4e 100644 --- a/samples/generated/v1beta2/artifact_registry.list_repositories.js +++ b/samples/generated/v1beta2/artifact_registry.list_repositories.js @@ -1,32 +1,36 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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() { +function main(parent) { // [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async] /** * TODO(developer): Uncomment these variables before running the sample. */ /** - * The name of the parent resource whose repositories will be listed. + * Required. The name of the parent resource whose repositories will be listed. */ // const parent = 'abc123' /** - * The maximum number of repositories to return. - * Maximum page size is 10,000. + * The maximum number of repositories to return. Maximum page size is 1,000. */ // const pageSize = 1234 /** @@ -43,6 +47,7 @@ function main() { async function callListRepositories() { // Construct request const request = { + parent, }; // Run request diff --git a/samples/generated/v1beta2/artifact_registry.list_tags.js b/samples/generated/v1beta2/artifact_registry.list_tags.js index 860c316..b7e7692 100644 --- a/samples/generated/v1beta2/artifact_registry.list_tags.js +++ b/samples/generated/v1beta2/artifact_registry.list_tags.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; @@ -34,8 +39,7 @@ function main() { */ // const filter = 'abc123' /** - * The maximum number of tags to return. - * Maximum page size is 10,000. + * The maximum number of tags to return. Maximum page size is 10,000. */ // const pageSize = 1234 /** diff --git a/samples/generated/v1beta2/artifact_registry.list_versions.js b/samples/generated/v1beta2/artifact_registry.list_versions.js index 7f9acb1..1657358 100644 --- a/samples/generated/v1beta2/artifact_registry.list_versions.js +++ b/samples/generated/v1beta2/artifact_registry.list_versions.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; @@ -25,8 +30,7 @@ function main() { */ // const parent = 'abc123' /** - * The maximum number of versions to return. - * Maximum page size is 10,000. + * The maximum number of versions to return. Maximum page size is 1,000. */ // const pageSize = 1234 /** @@ -37,6 +41,10 @@ function main() { * 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').v1beta2; diff --git a/samples/generated/v1beta2/artifact_registry.set_iam_policy.js b/samples/generated/v1beta2/artifact_registry.set_iam_policy.js index 39ddaf1..ae1a79a 100644 --- a/samples/generated/v1beta2/artifact_registry.set_iam_policy.js +++ b/samples/generated/v1beta2/artifact_registry.set_iam_policy.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js b/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js index db48e4f..a023b81 100644 --- a/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js +++ b/samples/generated/v1beta2/artifact_registry.test_iam_permissions.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.update_project_settings.js b/samples/generated/v1beta2/artifact_registry.update_project_settings.js new file mode 100644 index 0000000..aa0102f --- /dev/null +++ b/samples/generated/v1beta2/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_v1beta2_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').v1beta2; + + // 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_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta2/artifact_registry.update_repository.js b/samples/generated/v1beta2/artifact_registry.update_repository.js index dd00a7f..29c9b9b 100644 --- a/samples/generated/v1beta2/artifact_registry.update_repository.js +++ b/samples/generated/v1beta2/artifact_registry.update_repository.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/artifact_registry.update_tag.js b/samples/generated/v1beta2/artifact_registry.update_tag.js index 87867c2..3acc540 100644 --- a/samples/generated/v1beta2/artifact_registry.update_tag.js +++ b/samples/generated/v1beta2/artifact_registry.update_tag.js @@ -1,16 +1,21 @@ -// 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. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// 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'; diff --git a/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json b/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json new file mode 100644 index 0000000..ec8b776 --- /dev/null +++ b/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json @@ -0,0 +1,1127 @@ +{ + "clientLibrary": { + "name": "nodejs-artifactregistry", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.artifactregistry.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportAptArtifacts", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ImportYumArtifacts", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_async", + "title": "ArtifactRegistry listRepositories Sample", + "origin": "API_DEFINITION", + "description": " Lists repositories.", + "canonical": true, + "file": "artifact_registry.list_repositories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRepositories", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListRepositories", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_async", + "title": "ArtifactRegistry getRepository Sample", + "origin": "API_DEFINITION", + "description": " Gets a repository.", + "canonical": true, + "file": "artifact_registry.get_repository.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRepository", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Repository", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetRepository", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.CreateRepository", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "repository_id", + "type": "TYPE_STRING" + }, + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1beta2.Repository" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateRepository", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.UpdateRepository", + "async": true, + "parameters": [ + { + "name": "repository", + "type": ".google.devtools.artifactregistry.v1beta2.Repository" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Repository", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateRepository", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.DeleteRepository", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteRepository", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ListPackagesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListPackages", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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": 49, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Package", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetPackage", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeletePackage", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.VersionView" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.ListVersionsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListVersions", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.GetVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.devtools.artifactregistry.v1beta2.VersionView" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Version", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetVersion", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteVersion", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1beta2.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" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.ListFilesResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListFiles", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.GetFile", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.File", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetFile", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ListTagsResponse", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "ListTags", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.GetTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetTag", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.CreateTag", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "tag_id", + "type": "TYPE_STRING" + }, + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1beta2.Tag" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "CreateTag", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.UpdateTag", + "async": true, + "parameters": [ + { + "name": "tag", + "type": ".google.devtools.artifactregistry.v1beta2.Tag" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.Tag", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateTag", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.DeleteTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "DeleteTag", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.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.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.GetProjectSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "GetProjectSettings", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + }, + { + "regionTag": "artifactregistry_v1beta2_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.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "async": true, + "parameters": [ + { + "name": "project_settings", + "type": ".google.devtools.artifactregistry.v1beta2.ProjectSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.devtools.artifactregistry.v1beta2.ProjectSettings", + "client": { + "shortName": "ArtifactRegistryClient", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistryClient" + }, + "method": { + "shortName": "UpdateProjectSettings", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings", + "service": { + "shortName": "ArtifactRegistry", + "fullName": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry" + } + } + } + } + ] +} diff --git a/src/v1/artifact_registry_client.ts b/src/v1/artifact_registry_client.ts index 4875068..032b0e8 100644 --- a/src/v1/artifact_registry_client.ts +++ b/src/v1/artifact_registry_client.ts @@ -949,9 +949,8 @@ export class ArtifactRegistryClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.artifactRegistryStub!.then(stub => { + if (this.artifactRegistryStub && !this._terminated) { + return this.artifactRegistryStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/src/v1beta2/artifact_registry_client.ts b/src/v1beta2/artifact_registry_client.ts index c55ac7e..7258b6c 100644 --- a/src/v1beta2/artifact_registry_client.ts +++ b/src/v1beta2/artifact_registry_client.ts @@ -178,12 +178,27 @@ 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}' + ), 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, @@ -229,6 +244,18 @@ export class ArtifactRegistryClient { grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }) .operationsClient(opts); + const importAptArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse' + ) as gax.protobuf.Type; + const importAptArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata' + ) as gax.protobuf.Type; + const importYumArtifactsResponse = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse' + ) as gax.protobuf.Type; + const importYumArtifactsMetadata = protoFilesRoot.lookup( + '.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata' + ) as gax.protobuf.Type; const createRepositoryResponse = protoFilesRoot.lookup( '.google.devtools.artifactregistry.v1beta2.Repository' ) as gax.protobuf.Type; @@ -255,6 +282,16 @@ export class ArtifactRegistryClient { ) 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), @@ -328,6 +365,8 @@ export class ArtifactRegistryClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const artifactRegistryStubMethods = [ + 'importAptArtifacts', + 'importYumArtifacts', 'listRepositories', 'getRepository', 'createRepository', @@ -349,6 +388,8 @@ export class ArtifactRegistryClient { 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', + 'getProjectSettings', + 'updateProjectSettings', ]; for (const methodName of artifactRegistryStubMethods) { const callPromise = this.artifactRegistryStub.then( @@ -443,7 +484,7 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the repository to retrieve. + * Required. The name of the repository 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. @@ -1542,32 +1583,479 @@ export class ArtifactRegistryClient { {} | null | undefined > ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, + 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.v1beta2.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/v1beta2/artifact_registry.get_project_settings.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_async + */ + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProjectSettings( + request: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProjectSettings( + request?: protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IGetProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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/v1beta2/artifact_registry.update_project_settings.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_async + */ + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProjectSettings( + request: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, + callback: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProjectSettings( + request?: protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + | protos.google.devtools.artifactregistry.v1beta2.IUpdateProjectSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.artifactregistry.v1beta2.IProjectSettings, + ( + | protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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/v1beta2/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAptArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAptArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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/v1beta2/artifact_registry.import_apt_artifacts.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_async + */ + async checkImportAptArtifactsProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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/v1beta2/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importYumArtifacts( + request: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, + importYumArtifacts( + request?: protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1584,12 +2072,45 @@ export class ArtifactRegistryClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ - resource: request.resource || '', + parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); + 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/v1beta2/artifact_registry.import_yum_artifacts.js + * region_tag:artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_async + */ + async checkImportYumArtifactsProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + >; } - /** * Creates a repository. The returned Operation will finish once the * repository has been created. Its response will be the created Repository. @@ -1597,7 +2118,7 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource where the repository will be created. + * 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.v1beta2.Repository} request.repository @@ -1740,7 +2261,7 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the repository to delete. + * 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. @@ -2156,10 +2677,9 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose repositories will be listed. + * 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 10,000. + * 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] @@ -2255,10 +2775,9 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose repositories will be listed. + * 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 10,000. + * 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] @@ -2302,10 +2821,9 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose repositories will be listed. + * 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 10,000. + * 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] @@ -2542,12 +3060,13 @@ export class ArtifactRegistryClient { * @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 10,000. + * 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.v1beta2.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. @@ -2643,12 +3162,13 @@ export class ArtifactRegistryClient { * @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 10,000. + * 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.v1beta2.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} @@ -2692,12 +3212,13 @@ export class ArtifactRegistryClient { * @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 10,000. + * 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.v1beta2.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} @@ -2738,7 +3259,8 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose files 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: @@ -2849,7 +3371,8 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose files 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: @@ -2908,7 +3431,8 @@ export class ArtifactRegistryClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The name of the parent resource whose files 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: @@ -2978,8 +3502,7 @@ export class ArtifactRegistryClient { * * `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. + * 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] @@ -3087,8 +3610,7 @@ export class ArtifactRegistryClient { * * `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. + * 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] @@ -3144,8 +3666,7 @@ export class ArtifactRegistryClient { * * `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. + * 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] @@ -3186,6 +3707,77 @@ export class ArtifactRegistryClient { // -- 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 file resource name string. * @@ -3253,6 +3845,31 @@ export class ArtifactRegistryClient { 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. * @@ -3305,6 +3922,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. * @@ -3312,9 +4162,8 @@ export class ArtifactRegistryClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.artifactRegistryStub!.then(stub => { + if (this.artifactRegistryStub && !this._terminated) { + return this.artifactRegistryStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/src/v1beta2/artifact_registry_client_config.json b/src/v1beta2/artifact_registry_client_config.json index a9b6ba6..6d2c271 100644 --- a/src/v1beta2/artifact_registry_client_config.json +++ b/src/v1beta2/artifact_registry_client_config.json @@ -23,6 +23,14 @@ } }, "methods": { + "ImportAptArtifacts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportYumArtifacts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListRepositories": { "timeout_millis": 30000, "retry_codes_name": "unavailable", @@ -126,6 +134,14 @@ "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "GetProjectSettings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateProjectSettings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/src/v1beta2/artifact_registry_proto_list.json b/src/v1beta2/artifact_registry_proto_list.json index 05c797e..f325136 100644 --- a/src/v1beta2/artifact_registry_proto_list.json +++ b/src/v1beta2/artifact_registry_proto_list.json @@ -1,9 +1,11 @@ [ + "../../protos/google/devtools/artifactregistry/v1beta2/apt_artifact.proto", "../../protos/google/devtools/artifactregistry/v1beta2/file.proto", "../../protos/google/devtools/artifactregistry/v1beta2/package.proto", "../../protos/google/devtools/artifactregistry/v1beta2/repository.proto", "../../protos/google/devtools/artifactregistry/v1beta2/service.proto", "../../protos/google/devtools/artifactregistry/v1beta2/settings.proto", "../../protos/google/devtools/artifactregistry/v1beta2/tag.proto", - "../../protos/google/devtools/artifactregistry/v1beta2/version.proto" + "../../protos/google/devtools/artifactregistry/v1beta2/version.proto", + "../../protos/google/devtools/artifactregistry/v1beta2/yum_artifact.proto" ] diff --git a/src/v1beta2/gapic_metadata.json b/src/v1beta2/gapic_metadata.json index a549837..a4830e3 100644 --- a/src/v1beta2/gapic_metadata.json +++ b/src/v1beta2/gapic_metadata.json @@ -70,6 +70,26 @@ "testIamPermissions" ] }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, "CreateRepository": { "methods": [ "createRepository" @@ -190,6 +210,26 @@ "testIamPermissions" ] }, + "GetProjectSettings": { + "methods": [ + "getProjectSettings" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "updateProjectSettings" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "importAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "importYumArtifacts" + ] + }, "CreateRepository": { "methods": [ "createRepository" diff --git a/test/gapic_artifact_registry_v1.ts b/test/gapic_artifact_registry_v1.ts index 0830df5..f91e97e 100644 --- a/test/gapic_artifact_registry_v1.ts +++ b/test/gapic_artifact_registry_v1.ts @@ -153,12 +153,27 @@ describe('v1.ArtifactRegistryClient', () => { assert(client.artifactRegistryStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new artifactregistryModule.v1.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.artifactRegistryStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new artifactregistryModule.v1.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.artifactRegistryStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,21 @@ describe('v1.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getRepository 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.GetRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); }); describe('listDockerImages', () => { diff --git a/test/gapic_artifact_registry_v1beta2.ts b/test/gapic_artifact_registry_v1beta2.ts index 57814f9..22caf89 100644 --- a/test/gapic_artifact_registry_v1beta2.ts +++ b/test/gapic_artifact_registry_v1beta2.ts @@ -185,12 +185,27 @@ describe('v1beta2.ArtifactRegistryClient', () => { assert(client.artifactRegistryStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.artifactRegistryStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.artifactRegistryStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getRepository with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRepository(request), expectedError); + }); }); describe('updateRepository', () => { @@ -450,6 +480,22 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateRepository with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() + ); + 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', () => { @@ -561,6 +607,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getPackage with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPackage(request), expectedError); + }); }); describe('getVersion', () => { @@ -672,6 +733,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getVersion with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVersion(request), expectedError); + }); }); describe('getFile', () => { @@ -780,6 +856,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getFile with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFile(request), expectedError); + }); }); describe('getTag', () => { @@ -888,6 +979,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTag(request), expectedError); + }); }); describe('createTag', () => { @@ -996,6 +1102,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() + ); + request.parent = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createTag(request), expectedError); + }); }); describe('updateTag', () => { @@ -1107,6 +1228,22 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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', () => { @@ -1215,6 +1352,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteTag with closed client', async () => { + const client = new artifactregistryModule.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() + ); + request.name = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteTag(request), expectedError); + }); }); describe('setIamPolicy', () => { @@ -1326,6 +1478,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1beta2.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', () => { @@ -1437,6 +1604,21 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new artifactregistryModule.v1beta2.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', () => { @@ -1549,6 +1731,673 @@ describe('v1beta2.ArtifactRegistryClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new artifactregistryModule.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.ProjectSettings() + ); + client.innerApiCalls.getProjectSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProjectSettings( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ProjectSettings() + ); + client.innerApiCalls.updateProjectSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProjectSettings( + request, + ( + err?: Error | null, + result?: protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportAptArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.artifactregistry.v1beta2.IImportYumArtifactsResponse, + protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.ArtifactRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.artifactregistry.v1beta2.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.v1beta2.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.v1beta2.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', () => { @@ -3889,6 +4738,82 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); 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.v1beta2.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('file', () => { const fakePath = '/rendered/path/file'; const expectedParameters = { @@ -3965,6 +4890,44 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); + describe('projectSettings', () => { + const fakePath = '/rendered/path/projectSettings'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new artifactregistryModule.v1beta2.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 = { @@ -4028,5 +4991,257 @@ describe('v1beta2.ArtifactRegistryClient', () => { ); }); }); + + describe('tag', () => { + const fakePath = '/rendered/path/tag'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + repository: 'repositoryValue', + package: 'packageValue', + tag: 'tagValue', + }; + const client = new artifactregistryModule.v1beta2.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.v1beta2.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.v1beta2.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) + ); + }); + }); }); });